@agent-testkit/server
v0.1.2
Published
OpenAI- and Anthropic-compatible deterministic server for AI agent integration testing
Downloads
73
Maintainers
Readme
agent-testkit
Deterministic, stateless OpenAI- and Anthropic-compatible server backed by a Agent Testkit behavior document. Every response depends only on the validated document and current HTTP request.
import { createAgentTestkitServer } from "@agent-testkit/server";
import document from "./agent-testkit.config.js";
// Direct construction automatically materializes inline fixtures. For file
// fixtures, extensions, or cassettes, use loadAgentTestkitProject() and pass its
// document and resources.
const server = createAgentTestkitServer({ document });
const urls = await server.listen();
console.log(urls.openaiBaseURL);
console.log(urls.anthropicBaseURL);Or start the standalone server:
agent-testkit --config ./agent-testkit.config.ts --port 8080Global provider URLs are namespaced to avoid collisions:
- OpenAI:
http://localhost:8080/openai/v1 - Anthropic:
http://localhost:8080/anthropic
The server retains no request history or model state. Provider-shaped errors contain unmatched and ambiguous behavior details directly.
Coding-agent skill
The repository maintains agent-testkit under the top-level skills/ collection. It is intentionally separate from the server package.
