Back to directory

aimock

A single-package mock server for AI application testing that answers deterministically for LLM APIs, MCP, A2A, AG-UI, vector databases and search services on one local port, with record-and-replay of real API traffic.

aimock

aimock mocks everything an AI application talks to so a test suite can point its SDK at one local port and get deterministic answers with no API keys, no network access and no surprise bills: LLM APIs such as OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama and Cohere, image generation and editing, text-to-speech, transcription, audio translation and generation, video generation, embeddings, MCP tools and resources with session management, the A2A agent-to-agent protocol with SSE streaming, AG-UI agent-to-UI event streams for frontend testing, vector database endpoints compatible with Pinecone, Qdrant and ChromaDB, and services such as Tavily search, Cohere rerank and OpenAI moderation.

Its record-and-replay feature proxies real APIs, saves the traffic as fixtures, and replays it deterministically forever; timing-aware fixtures capture per-frame arrival timestamps so replay approximately reproduces the original time-to-first-token and inter-frame cadence, with a configurable replay-speed multiplier.

It installs as a single npm package and runs the whole suite on one port with a config file, or composes exactly the mocks needed through a programmatic API.

More in Testing

See all 69
  • Canary

    runcanary.ai

    An independent testing service, backed by Y Combinator, that runs an application and tries to break every change an AI coding agent makes, reporting what would have reached production.

  • MoEWatch

    github.com

    A diagnostic and audit library for Mixture-of-Experts models in HuggingFace Transformers that instruments router modules to catch expert collapse, routing entropy collapse and load imbalance during training.

  • Mockwave

    github.com

    An open-source, multi-protocol mock server for HTTP, GraphQL, SOAP, and gRPC, with weighted traffic splitting, dynamic JavaScript responses, chaos-testing fault injection, and an MCP server so an AI assistant can generate mock rules directly.