{"id":47827817,"url":"https://github.com/copilotkit/aimock","last_synced_at":"2026-04-18T01:06:31.720Z","repository":{"id":341730721,"uuid":"1171243154","full_name":"CopilotKit/aimock","owner":"CopilotKit","description":"Mock everything your AI app talks to — LLM APIs, MCP, A2A, vector DBs, search. One package, one port, zero dependencies.","archived":false,"fork":false,"pushed_at":"2026-04-03T19:38:56.000Z","size":850,"stargazers_count":121,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T19:39:13.597Z","etag":null,"topics":["ai-testing","aimock","llm","mcp","mock-server","openai"],"latest_commit_sha":null,"homepage":"https://aimock.copilotkit.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CopilotKit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-03T02:40:16.000Z","updated_at":"2026-04-03T19:35:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/CopilotKit/aimock","commit_stats":null,"previous_names":["copilotkit/mock-openai","copilotkit/llmock","copilotkit/aimock"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/CopilotKit/aimock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopilotKit%2Faimock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopilotKit%2Faimock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopilotKit%2Faimock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopilotKit%2Faimock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CopilotKit","download_url":"https://codeload.github.com/CopilotKit/aimock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CopilotKit%2Faimock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31374051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-testing","aimock","llm","mcp","mock-server","openai"],"created_at":"2026-04-03T20:01:05.062Z","updated_at":"2026-04-18T01:06:31.712Z","avatar_url":"https://github.com/CopilotKit.png","language":"TypeScript","readme":"# aimock [![Unit Tests](https://github.com/CopilotKit/aimock/actions/workflows/test-unit.yml/badge.svg)](https://github.com/CopilotKit/aimock/actions/workflows/test-unit.yml) [![Drift Tests](https://github.com/CopilotKit/aimock/actions/workflows/test-drift.yml/badge.svg)](https://github.com/CopilotKit/aimock/actions/workflows/test-drift.yml) [![npm version](https://img.shields.io/npm/v/@copilotkit/aimock)](https://www.npmjs.com/package/@copilotkit/aimock)\n\nhttps://github.com/user-attachments/assets/646bf106-0320-41f2-a9b1-5090454830f3\n\nMock infrastructure for AI application testing — LLM APIs, image generation, text-to-speech, transcription, video generation, MCP tools, A2A agents, AG-UI event streams, vector databases, search, rerank, and moderation. One package, one port, zero dependencies.\n\n## Quick Start\n\n```bash\nnpm install @copilotkit/aimock\n```\n\n```typescript\nimport { LLMock } from \"@copilotkit/aimock\";\n\nconst mock = new LLMock({ port: 0 });\nmock.onMessage(\"hello\", { content: \"Hi there!\" });\nawait mock.start();\n\nprocess.env.OPENAI_BASE_URL = `${mock.url}/v1`;\n\n// ... run your tests ...\n\nawait mock.stop();\n```\n\n## The aimock Suite\n\naimock mocks everything your AI app talks to:\n\n| Tool           | What it mocks                                                     | Docs                                                |\n| -------------- | ----------------------------------------------------------------- | --------------------------------------------------- |\n| **LLMock**     | OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere | [Providers](https://aimock.copilotkit.dev/docs)     |\n| **MCPMock**    | MCP tools, resources, prompts with session management             | [MCP](https://aimock.copilotkit.dev/mcp-mock)       |\n| **A2AMock**    | Agent-to-agent protocol with SSE streaming                        | [A2A](https://aimock.copilotkit.dev/a2a-mock)       |\n| **AGUIMock**   | AG-UI agent-to-UI event streams for frontend testing              | [AG-UI](https://aimock.copilotkit.dev/agui-mock)    |\n| **VectorMock** | Pinecone, Qdrant, ChromaDB compatible endpoints                   | [Vector](https://aimock.copilotkit.dev/vector-mock) |\n| **Services**   | Tavily search, Cohere rerank, OpenAI moderation                   | [Services](https://aimock.copilotkit.dev/services)  |\n\nRun them all on one port with `npx @copilotkit/aimock --config aimock.json`, or use the programmatic API to compose exactly what you need.\n\n## Features\n\n- **[Record \u0026 Replay](https://aimock.copilotkit.dev/record-replay)** — Proxy real APIs, save as fixtures, replay deterministically forever\n- **[11 LLM Providers](https://aimock.copilotkit.dev/docs)** — OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere — full streaming support\n- **[Multimedia APIs](https://aimock.copilotkit.dev/images)** — Image generation (DALL-E, Imagen), text-to-speech, audio transcription, video generation\n- **[MCP / A2A / AG-UI / Vector](https://aimock.copilotkit.dev/mcp-mock)** — Mock every protocol your AI agents use\n- **[Chaos Testing](https://aimock.copilotkit.dev/chaos-testing)** — 500 errors, malformed JSON, mid-stream disconnects at any probability\n- **[Drift Detection](https://aimock.copilotkit.dev/drift-detection)** — Daily CI validation against real APIs\n- **[Streaming Physics](https://aimock.copilotkit.dev/streaming-physics)** — Configurable `ttft`, `tps`, and `jitter`\n- **[WebSocket APIs](https://aimock.copilotkit.dev/websocket)** — OpenAI Realtime, Responses WS, Gemini Live\n- **[Prometheus Metrics](https://aimock.copilotkit.dev/metrics)** — Request counts, latencies, fixture match rates\n- **[Docker + Helm](https://aimock.copilotkit.dev/docker)** — Container image and Helm chart for CI/CD\n- **[Vitest \u0026 Jest Plugins](https://aimock.copilotkit.dev/test-plugins)** — Zero-config `useAimock()` with auto lifecycle and env patching\n- **[Response Overrides](https://aimock.copilotkit.dev/fixtures)** — Control `id`, `model`, `usage`, `finishReason` in fixture responses\n- **Zero dependencies** — Everything from Node.js builtins\n\n## GitHub Action\n\n```yaml\n- uses: CopilotKit/aimock@v1\n  with:\n    fixtures: ./test/fixtures\n\n- run: npm test\n  env:\n    OPENAI_BASE_URL: http://127.0.0.1:4010/v1\n```\n\nSee the [GitHub Action docs](https://aimock.copilotkit.dev/github-action) for all inputs and examples.\n\n## CLI\n\n```bash\n# LLM mocking only\nnpx @copilotkit/aimock -p 4010 -f ./fixtures\n\n# Full suite from config\nnpx @copilotkit/aimock --config aimock.json\n\n# Record mode: proxy to real APIs, save fixtures\nnpx @copilotkit/aimock --record --provider-openai https://api.openai.com\n\n# Convert fixtures from other tools\nnpx @copilotkit/aimock convert vidaimock ./templates/ ./fixtures/\nnpx @copilotkit/aimock convert mockllm ./config.yaml ./fixtures/\n\n# Docker\ndocker run -d -p 4010:4010 -v ./fixtures:/fixtures ghcr.io/copilotkit/aimock -f /fixtures\n```\n\n## Framework Guides\n\nTest your AI agents with aimock — no API keys, no network calls: [LangChain](https://aimock.copilotkit.dev/integrate-langchain) · [CrewAI](https://aimock.copilotkit.dev/integrate-crewai) · [PydanticAI](https://aimock.copilotkit.dev/integrate-pydanticai) · [LlamaIndex](https://aimock.copilotkit.dev/integrate-llamaindex) · [Mastra](https://aimock.copilotkit.dev/integrate-mastra) · [Google ADK](https://aimock.copilotkit.dev/integrate-adk) · [Microsoft Agent Framework](https://aimock.copilotkit.dev/integrate-maf)\n\n## Switching from other tools?\n\nStep-by-step migration guides: [MSW](https://aimock.copilotkit.dev/migrate-from-msw) · [VidaiMock](https://aimock.copilotkit.dev/migrate-from-vidaimock) · [mock-llm](https://aimock.copilotkit.dev/migrate-from-mock-llm) · [piyook/llm-mock](https://aimock.copilotkit.dev/migrate-from-piyook) · [Python mocks](https://aimock.copilotkit.dev/migrate-from-python-mocks) · [openai-responses](https://aimock.copilotkit.dev/migrate-from-openai-responses) · [Mokksy](https://aimock.copilotkit.dev/migrate-from-mokksy)\n\n## Documentation\n\n**[https://aimock.copilotkit.dev](https://aimock.copilotkit.dev)** · [Example fixtures](https://aimock.copilotkit.dev/examples)\n\n## Real-World Usage\n\n[AG-UI](https://github.com/ag-ui-protocol/ag-ui) uses aimock for its [end-to-end test suite](https://github.com/ag-ui-protocol/ag-ui/tree/main/apps/dojo/e2e), verifying AI agent behavior across LLM providers with [fixture-driven responses](https://github.com/ag-ui-protocol/ag-ui/tree/main/apps/dojo/e2e/fixtures/openai).\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopilotkit%2Faimock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopilotkit%2Faimock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopilotkit%2Faimock/lists"}