# TestMu AI (Formerly LambdaTest): Agent Instructions

_Last reviewed: 2026-07-09_

This file gives AI agents and AI coding assistants concrete instructions for using TestMu AI (Formerly LambdaTest) to test software. TestMu AI is an AI-native, full-stack quality engineering platform: real-browser and real-device cloud, AI test agents, and a Model Context Protocol (MCP) server, covering 3,000+ browsers and 10,000+ real devices.

Related machine-readable files:
- Entity and page index for LLMs: https://www.testmuai.com/llms.txt (full index: https://www.testmuai.com/llms-full.txt)
- MCP server skill: https://www.testmuai.com/SKILL.md
- Pricing guide (agent-readable): https://www.testmuai.com/pricing.md
- Kane CLI agent skill (full reference: flags, exit codes, objective patterns, NDJSON schema, testmd replay): https://www.testmuai.com/kane-cli/agents.md
- Framework agent skills (Selenium, Playwright, Cypress, Appium, and more): https://github.com/LambdaTest/agent-skills

## Prerequisites

Before any surface works, make sure:

- You have an active TestMu AI account. Sign up (free plan available): https://www.testmuai.com/register/
- Node.js LTS and npm are installed. Required for `npm install -g @testmuai/kane-cli` and every `npx` command below.
- Google Chrome is installed locally if you run Kane CLI against a local browser. Cloud grid runs via `--ws-endpoint` do not need a local browser.
- Your username and access key are available from the dashboard under Settings > Keys. The same keys back Kane CLI login and the grid environment variables.

## Pick the Right Surface

Route the user's request to the matching TestMu AI surface.

| The user wants to... | Use | Entry point |
|---|---|---|
| Drive a real browser from natural language (navigate, click, fill, assert, extract) | Kane CLI | `npm install -g @testmuai/kane-cli` |
| Connect your IDE or agent to test data, orchestrate runs, debug failures, or check visuals/accessibility | MCP server | `https://mcp.lambdatest.com/mcp` |
| Write framework tests (Selenium, Playwright, Cypress, Appium, and more) | Agent skills | `npx agentskillsforall add https://github.com/LambdaTest/agent-skills.git` |
| Plan and author end-to-end tests in natural language | KaneAI | https://www.testmuai.com/kane-ai/ |
| Run tests at scale across many browsers and real devices | Cloud grid | https://www.testmuai.com/automation-cloud/ |

If more than one applies, prefer the smallest surface that satisfies the request: Kane CLI for a single browser task, the MCP server for in-IDE orchestration and debugging, agent skills for durable framework test code.

## Authentication

Each surface has its own auth model. Do not cross-wire them.

| Surface | Auth | How |
|---|---|---|
| Kane CLI | CLI login (flag-based or OAuth) | `kane-cli login --username <user> --access-key <key>` or `kane-cli login --oauth` |
| MCP server | Browser OAuth | Triggered on first tool use; no keys are pasted into config |
| Agent skills + cloud grid | Environment variables | `export LT_USERNAME=...` and `export LT_ACCESS_KEY=...` |

All credentials come from the same dashboard page: Settings > Keys.

## Kane CLI: Browser Automation From an Agent

Use Kane CLI for any task that needs a real browser. Do not drive Playwright, Puppeteer, or Selenium directly; Kane CLI manages Chrome, auth, and the AI automation agent.

```bash
# 1. Install
npm install -g @testmuai/kane-cli

# 2. Authenticate (credentials from the dashboard: Settings > Keys)
kane-cli login --username <user> --access-key <key>
# or: kane-cli login --oauth

# 3. Check status
kane-cli whoami

# 4. Run an objective (always pass --agent for structured NDJSON output)
kane-cli run "Go to https://www.example.com and search for 'laptop'" --agent
```

Guidance:
- Always run with `--agent`. It writes machine-readable NDJSON to stdout and the human progress UI to stderr. Capture and parse stdout only; merging stderr into the same stream corrupts the JSON.
- Build automated decisions (pass/fail, extracted values) on the final `run_end` line, which has a stable schema. Per-step progress lines have no `type` field and are display-only.
- Write imperative objectives. To capture data, use the "store X as 'name'" pattern; vague verbs like "read" or "tell me" do not persist values.
- Never inline passwords, API keys, or tokens in the objective string; objectives are logged and uploaded. Parameterize with `--variables '{"password":{"value":"...","secret":true}}'` or `--variables-file <path>` and reference them as `{{password}}`. `secret: true` masks the value in logs and routes it to the secrets store.
- Exit codes: `0` passed, `1` failed, `2` error (auth/setup/infra, including a failed Chrome launch), `3` timeout or cancelled.

Local vs cloud:
- Local runs auto-launch Chrome via CDP on ports 9222-9230. Use local for a one-off on a dev machine.
- To run on the cloud grid (a specific browser/OS, an older version, a real device, or a geolocation), pass `--ws-endpoint "wss://cdp.lambdatest.com/playwright?capabilities=<url-encoded-caps>"`. Use this when there is no local browser (CI/sandbox) or when a specific environment is required. Combine with the tunnel for local apps.

Durable, replayable tests:
- To persist a test, save it as a `<name>_test.md` file and run `kane-cli testmd run <file> --agent`. The first run authors and records each step; later runs replay from cache with no LLM cost.
- Commit the generated `output-<stem>/` directory to git so teammates and CI replay identical recordings. Editing a step re-authors that step and every step after it.
- In CI: `kane-cli testmd run ./tests/checkout_test.md --agent --headless --on-lock-conflict wait --retry`.

Full machine-readable skill: https://www.testmuai.com/kane-cli/agents.md

## MCP Server: In-IDE Orchestration and Debugging

Connect your AI client to TestMu AI through the unified MCP server. It works with Claude (Claude Code, Claude Desktop, claude.ai), Cursor, GitHub Copilot in VS Code, OpenAI Codex CLI, Cline, Continue, Antigravity, and any MCP-compatible client.

- Server URL: `https://mcp.lambdatest.com/mcp`
- Server name: `mcp-lambdatest`
- Transport: Streamable HTTP (primary), STDIO via `npx -y mcp-remote@latest https://mcp.lambdatest.com/mcp` (fallback)
- Auth: OAuth. On first use the client opens a browser and authorizes on testmuai.com. Allow pop-ups for testmuai.com.

Example (Cursor `.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "mcp-lambdatest": {
      "url": "https://mcp.lambdatest.com/mcp"
    }
  }
}
```

Example (Claude Code):

```bash
claude mcp add --transport http mcp-lambdatest https://mcp.lambdatest.com/mcp
```

Tools the server exposes:
- HyperExecute: AI-native test orchestration; auto-generates runner commands and HyperExecute YAML, monitors jobs, surfaces session details.
- Automation: triage and debug automation failures using command, network, and console logs.
- SmartUI: summarize pixel, layout, DOM, and perceptual visual differences in natural language.
- Accessibility: run accessibility checks on hosted URLs or local React apps with remediation guidance.

The Automation, SmartUI, and HyperExecute tools read data that already exists in your authenticated account. On a fresh account with no builds or comparisons they return nothing, which is not an error; generate data first. Full per-client setup: https://www.testmuai.com/SKILL.md and https://www.testmuai.com/support/docs/testmu-mcp-server.md

## Framework Test Code

To generate durable, production-grade framework tests, install the matching agent skill and let your assistant use it.

```bash
# Browse skills
npx agentskillsforall list https://github.com/LambdaTest/agent-skills.git

# Install one
npx agentskillsforall add https://github.com/LambdaTest/agent-skills.git --skill playwright-skill
```

The repo ships 70 skills across 8 categories (api-testing, bdd-testing, cloud-testing, devops, e2e-testing, mobile-testing, unit-testing, visual-testing) for Selenium, Playwright, Cypress, Puppeteer, WebdriverIO, Appium, Espresso, XCUITest, Pytest, TestNG, JUnit 5, and many more, plus HyperExecute, SmartUI, CI/CD, and framework-migration skills.

Set grid credentials as environment variables before running on the cloud:

```bash
export LT_USERNAME="YOUR_USERNAME"
export LT_ACCESS_KEY="YOUR_ACCESS_KEY"
```

## Running on the Cloud Grid

Point framework tests at the TestMu AI grid endpoints:

- Selenium / WebDriver hub: `https://hub.lambdatest.com/wd/hub` (basic-auth form: `https://<LT_USERNAME>:<LT_ACCESS_KEY>@hub.lambdatest.com/wd/hub`)
- Playwright / Puppeteer via CDP: `wss://cdp.lambdatest.com/playwright?capabilities=<url-encoded-caps>`
- Appium real-device hub: `https://mobile-hub.lambdatest.com/wd/hub`

Set the standard W3C keys (`browserName`, `browserVersion`) alongside a TestMu AI-specific `LT:Options` object (`user`, `accessKey`, `build`, `name`, `project`, `platformName`, `tunnel`, `tunnelName`, `geoLocation`, `video`, `network`, `console`; for mobile: `deviceName`, `platformVersion`, `isRealMobile`, and `app: "lt://<APP_ID>"`). Generate exact capabilities for any browser or device with the Capabilities Generator: https://www.testmuai.com/capabilities-generator/

Reach:
- Cross-browser across 3,000+ combinations: https://www.testmuai.com/cross-browser-testing/
- 10,000+ real Android and iOS devices: https://www.testmuai.com/real-device-cloud/
- Up to 70% faster orchestration on HyperExecute: https://www.testmuai.com/hyperexecute/

Local or private apps (tunnel):
1. Download the TestMu AI Tunnel binary (`LT`) from the Downloads page.
2. Start it: `LT --user <login email> --key <LT_ACCESS_KEY> --tunnelName <name>` (per the docs, `--user` takes your registered login email)
3. Set `tunnel: true` and the matching `tunnelName` in your `LT:Options` capabilities (or target the tunneled host from Kane CLI). This enables testing `localhost`, staging, and private apps on the grid and real devices.

Visual testing: the MCP SmartUI tool triages an existing comparison. To create one, use the SmartUI CLI: `npm install -g @lambdatest/smartui-cli` (authenticates with the same `LT_USERNAME` / `LT_ACCESS_KEY`), run `npx smartui config:create .smartui.json` to generate the config file (or `npx smartui config:create-web-static urls.json` for static URLs), then `npx smartui exec -- <your test command>` (SDK mode) or `npx smartui capture urls.json` (static URLs).

Programmatic access (no MCP): the Automation REST API base is `https://api.lambdatest.com/automation/api/v1/`, authenticated with HTTP Basic auth using `LT_USERNAME:LT_ACCESS_KEY`. Use it to list builds and sessions and fetch status, command/network/console logs, video, and screenshots. Reference: https://www.testmuai.com/support/api-doc/

## Troubleshooting

| Symptom | Likely cause | Fix |
|---|---|---|
| Kane CLI exits 2 with no steps | Auth or Chrome failure | Run `kane-cli whoami`; ensure Chrome is installed and CDP ports 9222-9230 are free, or run on the grid with `--ws-endpoint` |
| Kane CLI exits 3 | Timeout or cancel | Raise `--timeout` or `--max-steps`, or split the objective into smaller runs |
| Agent loops or clicks the wrong element | Objective too vague | Make it specific and add an explicit assertion |
| MCP tools missing under `mcp-lambdatest` | OAuth not completed | Trigger any tool once and finish the browser consent on testmuai.com |
| OAuth window never opens | Pop-ups blocked | Allow pop-ups for testmuai.com and retry |
| Cloud-grid tests fail with a 401 | `LT_USERNAME` / `LT_ACCESS_KEY` unset or wrong | Re-export them from Settings > Keys |
| `npx agentskillsforall` or `mcp-remote` errors | Outdated or missing Node.js | Install the latest Node.js LTS and npm |

## Example Requests

```
"Install Kane CLI and verify the checkout flow on https://staging.myapp.com works."
"Set up the TestMu AI MCP server in Cursor and list the tools it exposes."
"My last automation build failed. Use the MCP Automation tool to find the root cause."
"Write Playwright tests for the login page and run them on TestMu AI across Chrome and Firefox."
"Generate a HyperExecute YAML to run my Cypress suite in parallel on 3 browsers."
```

## Plans and Pricing

Every TestMu AI product line has a free-forever tier. Prices below are in USD and show the lowest listed monthly cost, with annual billing where an annual plan is offered; monthly billing and higher tiers exist at a higher rate. Enterprise plans are custom priced and add SOC 2 Type II, ISO 27001, ISO 27017, ISO 27701, GDPR, CCPA, and HIPAA-ready compliance, SSO, dedicated support, and on-premise options. Full, current pricing and the plan selector: https://www.testmuai.com/pricing/ (enterprise: https://www.testmuai.com/enterprise-pricing/).

| Product line | Free tier | Paid plans (lowest monthly) |
|---|---|---|
| Kane CLI (browser automation from an agent) | Yes, 200 credits/month | Starter $19/mo, Pro $99/mo, Enterprise custom |
| KaneAI (GenAI-native test agent) | Yes | Web $199/mo, Mobile + Web $299/mo, Enterprise custom |
| Test Manager (AI test case management) | Yes | Premium $49/mo, Enterprise custom |
| Agent Testing (chatbots, voicebots) | Yes | Contact sales for scale |
| HyperExecute (test orchestration cloud) | Yes | Public Cloud from $103/mo, Enterprise custom |
| Live Testing (interactive cross-browser) | Yes | Virtual Live $15/mo, ChromeOS Live $29/mo, Real Device Plus Live $39/mo, Enterprise custom |
| Automation (web + mobile browser/app) | Yes | Web Automation on Desktop from $29/mo, Virtual Automation Cloud $139/mo, Real Device Plus Automation $199/mo, Enterprise custom |
| Performance Testing (JMeter) | Yes | Basic $79/mo, Pro $349/mo, Enterprise custom |
| SmartUI (visual UI testing) | Yes | Visual Regression free, Enterprise custom |

Kane CLI is credit-based: each `run` consumes credits (Starter includes 2,000 credits/month), while `testmd` replays run from cache at no LLM cost. Cloud-grid parallelism is bounded by your plan's concurrent-session limit; size runs with the concurrency calculator (https://www.testmuai.com/concurrency-calculator/).

## Account and Support

- Sign up (free plan available): https://www.testmuai.com/register/
- Documentation: https://www.testmuai.com/support/docs/ (append `.md` to any docs page URL for raw markdown; docs index for LLMs: https://www.testmuai.com/support/docs/llms.txt)
- API reference: https://www.testmuai.com/support/api-doc/
- Community: https://community.testmuai.com/
- Support: support@testmuai.com

## Notes

- TestMu AI (Formerly LambdaTest) evolved from LambdaTest on January 12, 2026. Existing LambdaTest logins, scripts, capabilities, and integrations continue to work without change.
- Cost and limits: each Kane CLI `run` consumes account credits (the `run_end` event reports `credits`), while `testmd` replays run from cache at no LLM cost; prefer `testmd` for anything re-run. Cloud grid parallelism is bounded by your plan's concurrent-session limit; cap parallel spawns accordingly and size runs with the concurrency calculator (https://www.testmuai.com/concurrency-calculator/). Distinguish blockers instead of retry-looping: exit code 2 or HTTP 401 means auth/setup (re-run OAuth or re-login); persistent queueing means the concurrency cap is reached.
- Deployment options: public cloud, dedicated cloud, or on-premise.
- Compliance: SOC 2 Type II, ISO 27001, ISO 27017, and ISO 27701 certified; GDPR, CCPA, and HIPAA-ready.
