aimock  by CopilotKit

Mock infrastructure for AI application testing

Created 2 months ago
606 stars

Top 53.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

CopilotKit/aimock provides a comprehensive, zero-dependency solution for mocking diverse AI infrastructure components, crucial for robust application testing. It targets AI developers and testers, enabling deterministic, efficient, and isolated testing of LLM integrations, agent protocols, vector databases, and multimedia services, thereby accelerating development cycles and improving application reliability.

How It Works

aimock acts as a unified mock server, capable of simulating numerous AI services including LLM APIs (11 providers), multimedia generation, agent communication protocols (MCP, A2A, AG-UI), and vector databases. It operates via a single package, offering both a programmatic API for granular control and a CLI for full-suite execution on a single port. Key features like record/replay, chaos testing, and drift detection allow for simulating real-world conditions and ensuring deterministic test outcomes without relying on live external services.

Quick Start & Requirements

  • Install: npm install @copilotkit/aimock (programmatic), npx aimock (CLI), or use the Docker image ghcr.io/copilotkit/aimock.
  • Prerequisites: Node.js environment. The project explicitly states "zero dependencies."
  • Docs: Official documentation is available at https://aimock.copilotkit.dev.
  • Example: A basic programmatic setup involves importing LLMock, configuring it, starting the mock server, setting environment variables (e.g., OPENAI_BASE_URL), running tests, and stopping the mock.

Highlighted Details

  • Supports 11 LLM providers (OpenAI, Claude, Gemini, etc.) with full streaming.
  • Mocks multimedia APIs (image, text-to-speech, transcription, video generation).
  • Simulates agent protocols (MCP, A2A, AG-UI) and vector databases (Pinecone, Qdrant, ChromaDB).
  • Features include Record & Replay, Chaos Testing (errors, disconnects), Drift Detection, and configurable Streaming Physics.
  • Integrates with Vitest/Jest, GitHub Actions, and offers fixture conversion from other mocking tools.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or project roadmap were found in the provided README excerpt.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license is highly permissive, allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

The tool is explicitly designed for testing and development environments, focusing on simulating AI service interactions rather than providing actual service implementations. No specific platform limitations or known bugs were detailed in the provided text.

Health Check
Last Commit

21 hours ago

Responsiveness

Inactive

Pull Requests (30d)
77
Issues (30d)
24
Star History
44 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Meng Zhang Meng Zhang(Cofounder of TabbyML), and
3 more.

qodo-cover by qodo-ai

0.2%
5k
CLI tool for AI-powered test generation and code coverage enhancement
Created 2 years ago
Updated 1 month ago
Feedback? Help us improve.