Skip to main content
Recorded on the previous UI. The videos and screenshots in this tutorial were captured on the old engine.remyx.ai interface and are pending a re-shoot on studio.remyx.ai. The flow they narrate still works, but navigation labels have changed — see the current app tour.
Build phase · ~10 minutes The experiment from Scope an experiment from a recommendation is scoped but unimplemented. There’s no code yet. This tutorial connects Claude Code to your Remyx project over MCP and uses the experiment’s launch context to generate a PR that puts the variant into your repo.
Prerequisites. You’ve completed Scope an experiment from a recommendation. There’s a scoped experiment with a generated launch context. You also need Claude Code installed on your machine.

Get your Remyx API key

  1. Open studio.remyx.ai/account.
  2. Go to API Access.
  3. Create a new key (or copy an existing one).
Keep the key handy. You’ll paste it into Claude Code’s MCP config in the next step.

Connect Claude Code to Remyx

Add the Remyx MCP server to Claude Code’s settings. Two scopes are available. Pick whichever fits your workflow.
Edit ~/.claude/settings.json:
Available across every Claude Code session.

Verify the connection

Start Claude Code in your repo, then ask:
The response should list the available MCP tools, including get_digest, get_experiments, create_experiment, update_experiment, get_experiment_context, log_decision, and set_project_context.

Set the project context

So that subsequent tool calls operate against the right Remyx project:
Project-scoped tool calls (get_experiments, create_experiment, etc.) use this context automatically. Override on individual calls to switch projects mid-session.

Pull the experiment context

Get the launch context for the experiment scoped in the previous tutorial:
The response includes:
  • Resource metadata. Title, abstract excerpt, key methods, your annotations.
  • Docker environment. Reference to a pre-built environment if the resource ships one.
  • Target repo structure. File tree of the repo so the agent knows where things live.
  • Implementation plan. AI-generated plan referencing actual file paths in your repo.
This is what the agent uses to ground the implementation. The more you edited the implementation plan during scoping, the cleaner the result.

Generate the implementation

Ask the agent to implement the technique:
The agent will:
  1. Read the implementation plan.
  2. Navigate the repo structure.
  3. Generate the code changes.
  4. Commit on a new branch.
  5. Push and open a PR.
For an automated end-to-end run that bundles the steps:
This calls run_experiment_implementation, which triggers the full clone → implement → push → PR sequence in one shot. Once the PR is open, link it to the experiment so status syncs and you can find it later:
The agent calls update_experiment to record the PR. If your repo has the GitHub integration connected (see Connectors), the PR’s status (open, merged, closed) syncs automatically via webhooks. You don’t need to update the experiment manually as the PR moves through review.

Review and iterate

The implementation produced is a starting point. Treat the PR like any other: review the diff, run local tests, adjust where the agent missed nuance, push commits. The experiment’s status updates as the PR moves. It transitions from draft to running once the variant is built and the eval can pick it up in the next tutorial.

Recap

You now have:
  • Claude Code connected to Remyx via MCP
  • A PR in your target repo that implements the experiment
  • The PR linked back to the Remyx experiment, with status syncing automatically
The variant is real code that will be evaluated next.

Full session example

End-to-end Claude Code session:
After this, Run an evaluation runs the actual eval against the locked template.

Tips

The agent matches against your experiment list. Specific names avoid ambiguity when several experiments share keywords.
Open the experiment in the Remyx UI and edit the AI-generated implementation plan before asking for the implementation. Specific guidance produces better PRs than letting the agent infer from the launch context alone.
With GitHub connected, the PR auto-links to the experiment. Status changes (merged, closed) sync via webhooks. You don’t need to manually update the experiment as the PR moves through review.

Next

Run an evaluation

Score the variant against the locked eval template on Modal, log the decision.

MCP Server reference

Full Remyx tool list for agents

Series overview

Full series arc