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.Documentation Index
Fetch the complete documentation index at: https://docs.remyx.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
- Open engine.remyx.ai/account.
- Go to API Access.
- Create a new key (or copy an existing one).
Connect Claude Code to Remyx
Add the Remyx MCP server to Claude Code’s settings. Two scopes are available. Pick whichever fits your workflow.- Global config
- Project config
Edit Available across every Claude Code session.
~/.claude/settings.json:Verify the connection
Start Claude Code in your repo, then ask: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: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:- 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.
Generate the implementation
Ask the agent to implement the technique:- Read the implementation plan.
- Navigate the repo structure.
- Generate the code changes.
- Commit on a new branch.
- Push and open a PR.
run_experiment_implementation, which triggers the full clone → implement → push → PR sequence in one shot.
Link the PR back to the experiment
Once the PR is open, link it to the experiment so status syncs and you can find it later: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, not the finished thing. 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 fromdraft 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
Full session example
End-to-end Claude Code session:Tips
Reference experiments by full name or ID
Reference experiments by full name or ID
The agent matches against your experiment list. Specific names avoid ambiguity when several experiments share keywords.
Edit the implementation plan before generating
Edit the implementation plan before generating
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.
Combine with the GitHub integration
Combine with the GitHub integration
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