Quick start
From an empty account to a prompt your backend resolves at runtime.
1. Create a prompt and a version
Sign in at evalwright.com, create an organization, then create a prompt. A prompt is a named thing with many versions; you write the first version's text, and every later change forks a new version rather than overwriting the old one.
Put the parts that change per call in {{double braces}}:
You are a support agent for {{productName}}.
Answer {{customerName}} in a {{tone}} tone, in at most {{maxWords}} words.2. Promote a version to production
Versions move draft → development → staging → production. The SDK resolves the production version, so a version nobody promoted is a version nobody can call. Promotion to production may require approval, depending on your organization's policy.
3. Create an API key
In the app, open API keys and create one. The plaintext key is shown exactly once — Evalwright stores only its hash, and a key you did not copy has to be replaced rather than recovered.
Scope it to the prompts it needs. See API keys.
4. Resolve it from your backend
import { EvalwrightClient } from "@evalwright/sdk";
const client = new EvalwrightClient({
apiKey: process.env.EVALWRIGHT_API_KEY!,
baseUrl: process.env.EVALWRIGHT_BASE_URL!,
});
const { prompt, version, promptVersionId } = await client.prompts.resolve(
"support-reply",
{
vars: {
productName: "Acme",
customerName: "Ada",
tone: "warm",
maxWords: "120",
},
},
);
console.log(`running ${version} (${promptVersionId})`);
const reply = await myModel.complete(prompt);baseUrl has no default and is required. There is no fallback address on purpose: every call carries your API key, and a default host is a host that collects keys from everyone who forgot to set one.
5. Change the prompt without deploying
Edit the prompt in the app, benchmark the new version against the old one, promote the winner. The next resolve() your backend makes returns the new text. Nothing on your side is rebuilt, redeployed or restarted.
If you need a caller to stay on one exact version while others follow production, pin it: resolve("support-reply@v7"). See prompts.resolve().