Skip to main content

AI Agents

AI Agent integration has two parts:

  • The MCP server runs a real browser and exposes it as tools the agent can call: start a session, run Gherkin steps, take screenshots, read the DOM, evaluate JavaScript, investigate failures.
  • The skills guide two jobs: letsrunit runs and investigates browser flows, while letsrunit-writer writes persistent feature tests and reusable custom step definitions. The writer checks available steps before adding custom code.

Setup​

Install Letsrunit for your project, including the MCP server and both skills

npx letsrunit@latest init

If you run init with no flags in an interactive terminal, the MCP option opens a second prompt where you can choose agents. For non-interactive mode find all available options with --help.

Global​

You can install the Letsrunit MCP server and skill globally for all your projects.

Add the MCP server and install both skills:

claude mcp add letsrunit -- npx -y @letsrunit/mcp-server@latest
npx skills add jasny/letsrunit -g -a claude-code

AGENTS.md​

Add the following to your AGENTS.md or CLAUDE.md to instruct the agent to verify its work with letsrunit and store passing tests as regression tests:

The agent must write a browser test before marking the test as completed.

## Browser testing

Use letsrunit to verify any task that changes UI behaviour. A task is not complete until the relevant flow has been tested in a real browser and passes.

When a scenario passes:

- Save it as a `.feature` file under `/features`
- Include it in the commit
- These files run in CI as regression tests for future changes

Only keep scenarios that cover flows that could plausibly break from an unrelated change. Skip trivial or redundant ones.