sphynx-sh is the TypeScript package for defining and running evals for coding agents. Suites, mocks and validators live in your repository next to the code they test.
Prerequisites
Set your harness key, such asOPENAI_API_KEY for Codex, under Settings > Environment. Then create an API key with evals:write and evals:read under Settings > API keys.
Install
Define a suite
Createsmoke.eval.ts:
Run it
Vocabulary
- Suite: a system prompt and shared setup for many cases. It needs an
id, and itsnamedefaults to the id. - Case: one eval. It needs an
id, and itsnamedefaults to the id. It sets up a scenario and checks the result withvalidate. A case gets a new version when its definition changes. - Variant: the harness, model and sandbox, plus an optional profile, a case runs on.
- Run: one case on one variant. It holds the trials.
- Trial: one attempt, in its own sandbox. A run’s pass rate is taken across its trials.
- Batch: the runs started together. Starting evals creates a batch.
Package exports
Definitions are plain objects and handlers are ordinary functions. Mock inputs use Standard Schema for types and runtime checks (the examples use Zod). You don’t need Effect or a separate model client.
Write cases
Add sources, preparation and typed validators.
Mock dependencies
Give agents typed MCP servers, CLIs and HTTP APIs.