MarketMirror
v0.5.0Test ads, prices and sales pitches on simulated buyers; get a go / iterate / no-go report.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
website_test
Run prepared synthetic visitors on a real website URL. Actions and screenshots are observed; only supplied DOM checks verify goals. Cart changes are enabled by cart/checkout goals; signup submission requires explicit test data and opt-in. No payments/orders. Background job: poll job_status.
| Parameter | Type | Description |
|---|---|---|
simulation_id * | string | |
spec * | object | |
out | string |
provider_setup
List provider choices and official key guides, inspect masked local settings, configure a local model or an existing key environment variable, or discover available models. Never paste an API key into tool arguments. ChatGPT/CLI login choices return local login commands.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
base_url | string | |
key_env | string | Environment variable NAME only; never the key itself |
model | string | |
provider | string |
doctor
Check MarketMirror: engine installed, Python deps, API key configured (never shown), backend running.
setup
Install or update the MarketMirror engine (git clone + uv sync). Background job; poll job_status. Needs git and uv.
start_backend
Start the MarketMirror backend (port 5001). Configure an API-key, eligible ChatGPT sign-in, local CLI gateway, or local-model provider first.
market_test
All-in-one market test. Config keys: name, title, seeds (absolute paths to documents), requirement (text), personas (persona spec object or absolute path) or auto_personas (int), creatives (feed-test object with creatives, landing, benchmarks), seeds_n (int, repeat the feed test with N seeds and report ranges), rounds (int), survey {offer, goal, messages (list), split, pricing}, panel {analysts, brief}, report (bool), simulation_id (reuse), approve_spend (bool). Without approve_spend it stops after creating the personas so you can show them to the user; then call again with simulation_id and a…
| Parameter | Type | Description |
|---|---|---|
config * | object |
job_status
Status, log tail and final result of a background job.
| Parameter | Type | Description |
|---|---|---|
job_id * | string |
results
Key results of a run: decision, verdicts, segments, objections, messages, pricing, feed-test metrics, ROI projections, files.
| Parameter | Type | Description |
|---|---|---|
run * | string | run name under mirofish_runs or absolute path |
list_runs
List previous runs with their decision.
start_live
Serve the live dashboard at http://127.0.0.1:5050/ (newest run, or a given run).
| Parameter | Type | Description |
|---|---|---|
run | string |
ads_import
Turn a Meta/Google Ads export (CSV or JSON, absolute path) into a seed Markdown file plus benchmarks JSON.
| Parameter | Type | Description |
|---|---|---|
file * | string | |
out * | string | absolute path of the seed .md to write |
campaign_plan
Save an evidence-led campaign plan and runnable test specs from a profile or existing project. No campaign is sent.
| Parameter | Type | Description |
|---|---|---|
budget * | object | |
goal * | string | |
channels | array | |
out | string | |
profile | object | |
profile_file | string | |
project | string | |
research | object | |
research_file | string |
actuals_import
Normalize a local ads, email, website, CRM or survey CSV/JSON export, retaining provenance and row-level validation errors.
| Parameter | Type | Description |
|---|---|---|
file * | string | |
source_type * | string | |
date | string | |
mapping | object | |
market | string | |
out | string | |
quality | string | |
source | string |
holdout_backtest
Evaluate independent held-out real experiments against a training-mean no-persona baseline.
| Parameter | Type | Description |
|---|---|---|
pairs * | array | |
out | string |
backtest
Score a run's feed test against real ad results (from ads_import): rank correlation, winner match, calibration.
| Parameter | Type | Description |
|---|---|---|
actuals * | string | |
run * | string | |
map | array |
understand
Step one for any product: read the user's documents (absolute paths to .md/.txt), a landing page URL and/or an ads export into one product profile (what it is, for whom, pricing, offer, proofs, differentiators, competitors, channels, likely objections, brand voice, KPIs, unknowns). Every later step uses it. Synchronous, one Claude call. Writes product_profile.json; pass `project` instead of docs to profile an existing project (also seeds the market map before the graph build).
| Parameter | Type | Description |
|---|---|---|
ads_file | string | |
docs | array | |
name | string | |
out | string | |
project | string | |
url | string |
quickstart
Easiest start. Answer a few questions and get a ready scenario folder (brief, personas, two template captions per platform, messages, launch calendar, pitch) plus the simulated people (stops before any paid rounds). Keys: brand, product (what, for whom, price), buyers (who and where), platforms (comma list), tests (ads, messages, price, launch, pitch), budget ('300 USD'), size (small|medium|large), past_ads (absolute path, optional), docs (paths, optional). Background job; poll job_status. The result names the files to edit and the exact next command.
| Parameter | Type | Description |
|---|---|---|
answers * | object | |
from_docs | array | documents to understand first; prefills the answers |
no_run | boolean | |
url | string |
pitch
Sales rehearsal: pitch a script to every simulated buyer of a simulation (its environment must be alive: run market_test with rounds first, or start it), collect objections and the questions they ask back, then answer with rebuttals ({objection_type: text, '*': generic}). Scores the pitch, each rebuttal, and every person (lead score). Background job.
| Parameter | Type | Description |
|---|---|---|
script * | string | |
simulation_id * | string | |
channel | string | |
product | string | |
rebuttals | object | |
run | string | |
segment | string |
ideas
Next test ideas from real data: pass ad rows you fetched from a connected ads tool (Meta/Google/TikTok: name, campaign, spend, impressions, clicks, conversions, country...) and/or an export file path, plus a previous run (its objections, audiences and decision). Returns prioritised experiments, each citing its evidence, with the MarketMirror config to simulate it first. Writes ideas.json/.md into the run folder and adds a 'Test ideas' section to the dashboard.
| Parameter | Type | Description |
|---|---|---|
ads_file | string | |
brand | string | |
brief | string | |
n | integer | |
rows | array | |
run | string |
push_context
While a simulation is running (or before it starts), push what people are saying today into every persona card from the next round on: a news item, a competitor's move, a real thread you just read with your browser, a price change. Each update is one or two sentences; the runner re-reads the file every round. Use it to ground the rounds in live reality.
| Parameter | Type | Description |
|---|---|---|
simulation_id * | string | |
text * | string | |
round | integer | |
source | string |
research
What real people say about a product, category or competitor, from public keyless sources: Hacker News stories and comments, App Store listings and recent reviews for a country storefront (in, ph, ke, us...), Reddit public search when it answers (it often blocks non-browser clients; the result says so, then use your own browser tools and add what you find as seed files), and any page URLs. Writes research.md (themes with quotes and links), research.json and voices.json (short real quotes the personas and feeds draw on) under scenarios/<query>/research. Run it before planning personas.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
country | string | |
out | string | |
sources | string | |
subreddits | array | |
urls | array |
predict
Predictions with intervals for a run: CTR per ad, cost per lead, would-convert overall and per audience, email click rates, each scaled by the real-vs-simulated results stored so far (from backtest and calibrate) and labelled with its basis ('calibrated on N real results' or 'uncalibrated prior'); optional targets (e.g. {ctr: 2, cpl: 10}) give a probability of success. Also a 30/60/90-day adoption forecast from the best ad, its landing conversion and the word of mouth seen in the rounds.
| Parameter | Type | Description |
|---|---|---|
run * | string | |
brand | string | |
days | integer | |
spend | number | |
targets | object |
study
Several scenarios x several seeds on the same simulated people, one defended conclusion. spec: {name, base (a market_test config object: creatives, survey, pitch, emails, rounds...), simulation_id (the people to reuse), scenarios: [{name, overrides}], seeds: [1,2,3], steps: [feed_test, rounds, survey, pitch, email_test]}. Writes study_summary.json (per-scenario mean, spread and 95% interval of every metric, deltas, winner stability, decision agreement matrix, conclusion with confidence), study_report.md and study.html under mirofish_runs/<name>/. Finished cells are reused on rerun. Background…
| Parameter | Type | Description |
|---|---|---|
spec * | object | |
out | string |
run_test
Test anything from one spec on a prepared simulation: type = ad | message | price | offer | positioning | naming | landing | launch | pitch | email | creator_post | channel_mix; variants = the things to compare (ad creatives, message lines, prices, offer wordings, names, landing pages, launch posts with rounds, pitch scripts, emails); audience {segments, countries}; metric (default per type); budget {amount, cpm, currency}; rounds (launch). Returns one result shape for every type: each variant's metric with a 95% margin, the winner, the lift, whether it is clear or a tie, and how to read it. B…
| Parameter | Type | Description |
|---|---|---|
simulation_id * | string | |
spec * | object | |
brand | string | |
run | string |
email_test
Email campaign test on the simulated people's inboxes: pass emails [{id, from_name, subject, preheader, body, cta, send_time (morning|midday|evening|night), segments?, sequence?: [{delay_days, subject, body}]}] plus optional list_size and benchmarks {cost_per_send, lead_value, close_rate, deal_value}. Each person gets a realistic inbox for the day; an attention gate decides opens, Claude decides skim/read/click/reply/unsubscribe/spam with honest odds. Returns open, click, click-to-open, unsubscribe and spam rates per variant and audience, subject-line ranking, sequence funnel, projection from…
| Parameter | Type | Description |
|---|---|---|
emails * | array | |
simulation_id * | string | |
benchmarks | object | |
list_size | integer | |
run | string |
calibrate
Check a run's simulated survey against real answers (absolute path to a CSV with segment,country,gender,age,y where y is yes/maybe/no or 0-1; 50-300 rows is enough): covariate overlap, per-audience calibration, a trust / correct / walk-away verdict and an AIPW-corrected rate. Writes calibration.json into the run folder.
| Parameter | Type | Description |
|---|---|---|
real_csv * | string | |
run * | string | |
by | string | |
field | string | |
map | array |
cli
Advanced: run any MarketMirror CLI command as a background job, e.g. ['survey','--simulation','sim_x','--offer','...']. See CLAUDE.md in the engine.
| Parameter | Type | Description |
|---|---|---|
args * | array |