Skip to Content
LoremLLM

Overview

Every LoremLLM package, what it mocks or records, and when to reach for it.

The hosted API covers most needs. Packages run the same mocks inside your process, with no network, and record real traffic into new mocks.

PackageUse it to
loremllmDefine mocks in code, run the local server, push and pull
@loremllm/ai-sdkStream mocks into useChat, or use one as an AI SDK language model
@loremllm/eveHost a mock over the eve agent protocol
@loremllm/openaiRun a mock behind the OpenAI SDK, in process
@loremllm/anthropicRun a mock behind the Anthropic SDK, in process
@loremllm/mcpRun a fake MCP server over stdio or HTTP
@loremllm/recordRecord real LLM and MCP traffic, replay it as a mock
@loremllm/testSet up scenarios in tests and assert on what your code did

Shared building blocks

Every package accepts the same mock definition. Reply builders like text, toolCall and error come from loremllm and work everywhere:

import { defineMock, text, toolCall } from "loremllm";

export const supportBot = defineMock("support-bot", {
  scenarios: [
    { when: { prompt: /refund/i }, reply: toolCall("lookupOrder", { id: "A-1042" }) },
    { reply: text("How can I help?") },
  ],
});

Pass supportBot to @loremllm/openai, @loremllm/ai-sdk or @loremllm/test, or push it to the hosted API with the CLI. Or pass a slug like "support-bot" and the package pulls the hosted mock for you.

On this page