
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 1M weekly installs with 700+ GitHub stars, and it's quietly powering the test suites at OpenClaw, TanStack, Mastra, and the AG-UI protocol.
1. fixture.json
{ "match": { "userMessage": "Hello" },
"response": { "content": "Hi!" } }
2. $ npx aimock -f fixture.json
3. $ export OPENAI_BASE_URL=http://localhost:4010Nothing in your app or SDK changes. Your existing tests just stop making real API calls.
Out of the box, aimock ships fixtures for:
Recent releases have focused on making aimock behave less like a stub and more like a real test harness:
npm install @copilotkit/aimockMIT-licensed, open source, from the team at CopilotKit. If you're testing anything that talks to an LLM, aimock belongs in your CI.
Want to bring CopilotKit into your stack? Talk to our engineers and we'll help you set it up.
Follow CopilotKit on Twitter for updates. If you get stuck, reach out in the CopilotKit or AG-UI communities.



Subscribe to our blog and get updates on CopilotKit in your inbox.