cd /news/developer-tools/aimock-deterministic-mock-infra-for-… · home topics developer-tools article
[ARTICLE · art-117646] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

aimock: Deterministic Mock Infra for AI Apps

CopilotKit's open-source mock server aimock has surpassed 2.5 million weekly installs, providing deterministic test infrastructure for AI applications. The tool allows developers to mock LLM endpoints, MCP tools, vector databases, and other AI services, enabling offline, token-free testing with features like record-and-replay, drift detection, and chaos testing.

read2 min views1 publishedSep 1, 2026

aimock crossed 2.5M weekly installs!

If you've been building AI apps, you've probably hit the same wall: your test suite runs against real LLM endpoints, so every CI run burns tokens, every provider hiccup breaks your build, and every dev on your team needs API keys just to run npm test.

aimock is our fix for that.

It's an open-source mock server for every AI service your app talks to - LLMs, MCP tools, agentic protocols, vector databases, image models, TTS. You write a JSON fixture, point your API URL at localhost, and your tests run offline in milliseconds. Zero tokens, zero flake, deterministic every run.

It just crossed 2.5M weekly installs with 900+ GitHub stars, and it's quietly powering the test suites at OpenClaw, TanStack, Mastra, Composio, the AG-UI protocol and others.

The 3-line setup

1. fixture.json
   { "match":    { "userMessage": "Hello" },
     "response": { "content": "Hi!" } }

2. $ npx aimock -f fixture.json

3. $ export OPENAI_BASE_URL=http://localhost:4010

Out of the box, aimock ships fixtures for:

LLMs : OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere, OpenRouter

Protocols : MCP, A2A, AG-UI

Vector DBs : Pinecone, Qdrant, ChromaDB

Multimedia : image generation, TTS, transcription, video generation

Services : Tavily search, Cohere rerank, OpenAI moderation, ElevenLabs

Recent releases have focused on making aimock behave less like a stub and more like a real test harness:

Record & Replay : capture live API traffic once in development, replay it forever in CI. Your test suite becomes a bit-exact snapshot of what production actually returns.

Drift Detection : LLM providers silently change response shapes. aimock catches those changes within 24 hours, so your CI fails before your users do.

Chaos Testing : inject latency, timeouts, and error responses on demand. Prove your app handles the messy paths real providers actually produce.

First-class MCP + A2A support : mock agentic protocols with the same fixture syntax you'd use for a chat completion.

Getting started

Install - npm install @copilotkit/aimock

Site & docs - aimock.copilotkit.dev

GitHub - github.com/CopilotKit/aimock

MIT-licensed, open source, from the team at CopilotKit. If you're testing anything that talks to an LLM, aimock belongs in your CI.

Thanks for reading!!

── more in #developer-tools 4 stories · sorted by recency
── more on @copilotkit 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/aimock-deterministic…] indexed:0 read:2min 2026-09-01 ·