CopilotKit

aimock: Mock AI APIs and Agent Services for Testing

aimock is a TypeScript, Node.js toolkit that serves deterministic mocks for the APIs and protocols AI applications use, all from one local server. It helps teams test agents and AI features without live credentials, network calls, or provider costs.

ActiveTypeScriptMITAILLMTesting
Stars
985
Forks
81
Stars, last 30 days
+40
Last commit
today
Contributors
28

Our take

Activeregular commits and releases

Health score

66/100

How it is scored
Activity
87
Community
41
Issues
54
Pull requests
81

+40 stars in the last 30 days

  • Releases more often than 90% of the projects we track
  • Merges more pull requests than 90% of the projects we track

aimock is an actively maintained, broad testing toolkit for TypeScript and Node.js teams, but its young project history and concentrated contribution make ownership worth evaluating.

Good fit if

  • Your AI application needs repeatable tests across provider APIs or agent protocols.
  • You want one local server for fixtures, recorded interactions, and simulated failures.
  • Your team can run Node.js 20.15 or later and values an MIT-licensed tool with frequent releases and active issue handling.

Look elsewhere if

  • You need hosted file-search execution, which aimock explicitly does not support for vector stores.
  • Your tests require replay to reproduce the exact original streaming chunk count or per-token timing; replay aims to preserve approximate timing instead.
  • You need a project with broadly distributed maintainer ownership, since most contributions currently come from one person.
All health signals
Last commit2026-10-24 (today)
Commits, last 90 days100+
Releases, last 12 months75 (latest v1.46.0, 2026-10-21)
Contributors28 (top contributor: 88% of commits)
Issues closed, last 90 days7+ (typically closed in 6 days)
Pull requests merged, last 90 days85 (typically merged in 0 days)
Project age8 months

Checked on 2026-10-24 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

1,019

Forks

85

Change since Nov 16, 2026: +4 stars·0 forks

Overview

aimock is a TypeScript toolkit for Node.js that brings together deterministic mocks for AI application dependencies behind one local port. It addresses the cost and unpredictability of testing against live services, letting developers point their SDKs and agents at mocks instead of real APIs. The suite covers LLM providers as well as MCP, A2A, AG-UI, vector databases, search, and other services.

Use it as a programmatic test server or run it from the CLI. Fixtures can be scripted directly or recorded from real API calls and replayed later, making aimock relevant both for isolated tests and end-to-end agent workflows.

Key Features

  • Mock multiple LLM provider APIs, including streaming and selected WebSocket interfaces.
  • Mock MCP tools, A2A agents, AG-UI event streams, vector database endpoints, search, reranking, and moderation.
  • Record real API interactions as fixtures and replay them deterministically, including multi-turn conversations and tool rounds.
  • Configure streaming timing and inject failures such as rate limits, server errors, malformed responses, and disconnects.
  • Inspect requests through a journal, and access route catalogs and Prometheus metrics.
  • Start the suite from a config file, use the programmatic API, or integrate with Vitest, Jest, Docker, or Helm.

Use Cases

  • AI application developers can test provider integrations without sending requests to paid APIs or relying on network access.
  • Agent teams can exercise tool calls and multi-turn flows using scripted responses and MCP fakes.
  • QA engineers can check retry and error handling by introducing rate limits, latency, and malformed responses.
  • Teams maintaining integrations can record representative real interactions, then replay them offline in CI.

What you need

Detected in the repository

  • Node.js >=20.15.0 (from package.json)
  • A Dockerfile, so it can run in a container
  • A Helm chart for Kubernetes
  • Automated checks on GitHub Actions

License in plain words

MITpermissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the copyright and license notice
  • Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install the package:

npm install @copilotkit/aimock

See the README and documentation for fixture formats, provider setup, and CLI options.

Considerations

The project is young, despite frequent commits and releases, and contribution activity is heavily concentrated in one contributor. That creates a maintainer-dependency risk even though the contributor pool is larger and recent issue handling is active. The supplied requirements identify Node.js 20.15 or later; Docker and Helm are also supported. The README notes that hosted OpenAI vector-store file_search execution is not supported, and that recorded replay preserves approximate timing rather than exact stream-chunk fidelity. It also calls out an HTTP/1 setup requirement for the current AWS JavaScript Bedrock SDK. Check the project documentation for provider-specific compatibility before adopting it across a large test suite.

Found this useful?

Share it with someone who would like aimock.