docs

Getting Started Mimic Documentation

Mimic is an open-source synthetic environment engine for AI agent development. One persona generates coherent data across every database, API, and MCP server your agent touches. Deterministic, offline-capable, and free.

Installation

Install the CLI globally via npm, pnpm, or yarn:

bash
$ npm install -g @mimicai/cli

Or run directly with npx — no install needed:

bash
$ npx @mimicai/cli init

Requirements: Node.js 18+ (Node 22 recommended). No other dependencies.

Quickstart

Get a fully mocked environment running in under 60 seconds.

1. Initialise a project

bash
$ mimic init

Creates a mimic.json config and .mimic/ data directory. Edit it to declare your domain, personas, and databases:

jsonmimic.json
"domain": "personal finance assistant",
​
"personas": [
  {
    "name": "finance-alex",
    "description": "32yo fintech PM, $85K salary, 3 bank accounts"
  }
],
​
"databases": {
  "primary": {
    "type": "postgres",
    "url": "$DATABASE_URL",
    "schema": { "source": "prisma", "path": "./prisma/schema.prisma" }
  }
},
​
"apis": {
  "stripe": { "enabled": true, "mcp": true },
  "plaid": { "enabled": true, "mcp": true }
}

2. Generate blueprints & seed databases

bash
$ mimic run                           # Generate persona blueprints
$ mimic seed --verbose               # Seed database with persona data

Populates your PostgreSQL (or MongoDB, MySQL, SQLite) with persona-consistent data — users, accounts, transactions, all matching the persona’s story.

3. Start mock APIs + MCP servers

bash
$ mimic host
​
 Stripe API    → http://localhost:4100/stripe/v1
 Plaid API     → http://localhost:4100/plaid
 Ready in 1.2s

Point your agent at localhost:4100 instead of production APIs. Everything just works.

4. Run tests

bash
$ mimic test

Execute test scenarios against your mock environment with optional AI-powered evaluation.

5. Clean up

bash
$ mimic clean

Truncates all seeded database tables, removes .mimic/data/, and clears cached blueprints in .mimic/blueprints/.