Sep 10One Agent, Three Surfaces
Copilot Kit Logo

aimock: Deterministic Mock Infra for AI Apps

By Eli Berman
August 14, 2026
aimock: Deterministic Mock Infra for AI Apps

aimock crosses 1M weekly installs!

Here's what it does and what's new

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.

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

Nothing in your app or SDK changes. Your existing tests just stop making real API calls.

What you can mock

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

What's new

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

MIT-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.

Top posts

See All
Building a Production-Ready Slack Agent with Channels SDK
Nathan Tarbert and Anmol BaranwalAugust 13, 2026
Building a Production-Ready Slack Agent with Channels SDKWatch Mike Ryan (CopilotKit Engineer) build a production-ready Slack agent, using Mastra, end to end with the Channels SDK. It's the open-source library that brings any AG-UI agent into Slack, Teams, Discord, WhatsApp, and more chat platforms. Learn how an agent goes from a message in a channel to a real response, with tools, rich native messages, and durable memory across a thread.
Claude Managed Agents are now AG-UI compatible
Eli Berman August 12, 2026
Claude Managed Agents are now AG-UI compatibleAnthropic just shipped a full AG-UI integration for Claude Managed Agents (CMA), so you can drop a Managed Agent into any AG-UI-compatible frontend without gluing together your own transport, state sync, and UI primitives. That means React, React Native, Next.js, and Angular on the web, plus Slack, Teams, and other messaging surfaces via the Channels SDK — all with generative UI, streaming, tool calls, and stateful sessions. Everything is open source. Here's where to start and how to ship.
Introducing Channels SDK - Bring Any Agent to Any Channel
Anmol Baranwal and Nathan TarbertAugust 4, 2026
Introducing Channels SDK - Bring Any Agent to Any ChannelWe're introducing the Channels SDK, an open source library that brings any AG-UI agent into Slack, Microsoft Teams, and every other chat platform, from one codebase. Write your agent once and it runs natively on each channel, with generative UI, tools, MCP servers, human-in-the-loop approvals, file uploads, and memory that follows the user across channels.
Are you ready?

Stay in the know

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