Skip to main content
There are two ways in. The fastest is to connect an MCP client and let your AI client do the driving; the classic path is to add the collector to your agent and build a mirror from its traces. They end in the same place: real sessions replaying against every change, in CI.

Option A: connect an MCP client

Mirrors hosts an MCP server that exposes the full product surface — build, explore, query, and eval mirrors from Claude Code, Cursor, VS Code, ChatGPT, Codex, and any other MCP client. Sign-in happens in the browser on first use; no API key needed.
claude mcp add --transport http mirrors https://api.runmirrors.com/mcp
Then run /mcpmirrorsAuthenticate and ask your client to build a mirror from your traces. See MCP server for every client, one-click installs, and headless setups.

Option B: add the collector

1

Get an API key

Sign in at runmirrors.com and mint a workspace API key (mk_live_…) under Settings → API keys.
2

Add two lines to your agent

Install the collector and initialize it before your agent runs. It auto-instruments LangChain/LangGraph, Anthropic, and OpenAI, and ships traces in the background — non-blocking, and it never raises into your app.
# pip install mirrorkit
import mirrorkit
mirrorkit.init(api_key="mk_live_...", project="my-agent")
// npm install mirrorkit
import * as mirrorkit from 'mirrorkit';
mirrorkit.init({ apiKey: 'mk_live_...', project: 'my-agent' });
// go get github.com/ai-singhal/mirrorkit-go
mirrorkit.Init(mirrorkit.Options{APIKey: "mk_live_...", Project: "my-agent"})
Run your agent normally — traces start streaming. Details per language: Python, TypeScript, Go.
3

Build a mirror

From the dashboard (Ingest → Build), or from the CLI:
pip install "mirrorkit[cli]"
mirrors login                                   # paste your mk_live_… key
mirrors build --project my-agent --name my-agent
Mirrors turns the traces into a schema, a seeded database, and tool bindings — a runnable copy of your agent’s world, scored per tool for fidelity.
4

Replay and query it

mirrors query my-agent "cancel my flight"   # one-shot run + trace
mirrors chat my-agent                       # multi-turn conversation
Or use the Playground in the dashboard. Same session, two versions of the agent, one caught regression.
5

Gate merges in CI

In Quickstart → CI eval gate, connect the GitHub App and bind your repo to a mirror and an eval set. Every PR that touches your agent replays the eval set and reports a Mirrors eval gate status check you can make required. See CI gate.

Next steps

How it works

Fidelity scoring, deterministic seeding, business context, and evals.

CI gate

Block regressions at the pull request, Vercel-style.