predicate()Is this true?
Ask a yes/no question. Get the model’s probability of yes, then apply your threshold.
Some questions don’t fit in a regular expression.
Ask them in plain language. Get answers your code can use.
Sysone is a small TypeScript library. Jev is its first model integration. This site helps you try it, understand it, and use it.
Read the sourceTry a real evaluation. Change the text.
See what changes — and what doesn’t.
Your text is sent to Vercel AI Gateway and TypeSafe to evaluate. Avoid personal or confidential information. How data is handled
Run the example to see the actual answer, its probability, and the code behind it.
Yes ≥ 80% · No ≤ 20% · Otherwise, uncertain.
Adjusting this uses the same answer. No new model call.
A predicate asks one yes/no question. Jev returns a probability; you choose how much evidence is enough to act.
Understand the three primitives →import { createSysone, predicate } from "sysone";
import { vercel } from "sysone/providers/vercel";
const sys = createSysone({ model: vercel() });
const needsReply = predicate("Does this message need a reply from its recipient?");
const result = await sys.check(message, needsReply, {
minProbability: 0.80,
});
// result.decision: "yes" | "no" | "uncertain"No chat history. No generated essay.
One input, explicit questions, structured answers.
predicate()Ask a yes/no question. Get the model’s probability of yes, then apply your threshold.
classifier()Describe a set of categories. Get a label from your list, with a distribution when available.
rubric()Define ordered levels. Get an expected level index, useful for assessment and ranking.
At an 80% threshold, a probability of 60% becomes uncertain. Keep it for review, ask a more specific question, or choose another action. A network error throws; it never becomes uncertainty.
Use Node.js 22 or later and ESM. Keep provider credentials in your server environment.
The first npm publication is pending. Install the same package from the GitHub release below; the imports and API are unchanged.
npm install https://github.com/sysone-help/sysone/releases/download/v0.1.0/sysone-0.1.0.tgz
npm install ai@7.0.105 @ai-sdk/gateway@4.0.85
# Set AI_GATEWAY_API_KEY in your server environmentimport { createSysone, predicate } from "sysone";
import { vercel } from "sysone/providers/vercel";
const sys = createSysone({ model: vercel() });
const needsReply = predicate("Does this message need a reply?");
const result = await sys.check("Can you send the proposal?", needsReply);
// { decision: "yes" | "no" | "uncertain", probability, metadata }Definitions are immutable data. Creating them is local and free. evaluate asks multiple independent questions about the same input in one request.
import { predicate, classifier } from "sysone";
const needsReply = predicate("Does this need a reply?");
const team = classifier({
billing: "Payments, invoices and refunds",
support: "Bugs and technical questions",
other: "Everything else",
});
const { answers } = await sys.evaluate(message, { needsReply, team });
answers.team.choice; // "billing" | "support" | "other"
answers.needsReply.probability; // number, from 0 to 1Each question sees the input, not the answers to the other questions. Raw evaluation returns evidence; check applies a yes/no threshold.
const groups = await sys.partition(messages, needsReply, {
select: message => message.body,
minProbability: 0.85,
concurrency: 4,
});
groups.yes; // Keep the original objects
groups.no; // Preserve their original order
groups.uncertain; // Review these separately
// Only need the yes group? filter uses the same policy.
const actionable = await sys.filter(messages, needsReply, {
select: message => message.body,
});For ranking, define a rubric rather than an unexplained score:
import { rubric } from "sysone";
const urgency = rubric("How urgent is this request?", [
"Routine: no time pressure",
"Soon: time-sensitive but not blocking",
"Immediate: active outage or severe disruption",
]);
const ranked = await sys.rank(messages, urgency, {
select: message => message.body,
});
// [{ item, score, answer, metadata }] — highest score firstCollections make one request per item. Ranking scores each item independently against the same rubric. Equal scores keep input order.
The first release supports Jev through TypeSafe and Vercel. Change the configured model without rewriting your questions.
// The manufacturer's native endpoint
typesafe("jev-1.13.0")
// Through Vercel AI Gateway
vercel("typesafe-ai/jev")
// Explicit credentials are also supported
typesafe("jev-latest", { apiKey: process.env.TYPESAFE_API_KEY })Cloudflare and OpenRouter also offer access to Jev; their Sysone adapters are not included in this release. A custom integration implements the exported EvaluationModel interface.
The Vercel adapter uses an experimental AI SDK evaluation API. Its optional dependencies are pinned to tested versions. Confidence and probabilities may differ across models; thresholds need evaluation on your own examples.
check defaults to 80%. filter excludes uncertain items; partition keeps them available.{ signal: controller.signal } to an operation. The default per-request timeout is 30 seconds.SysoneError.Sysone is a community library, not a hosted product.
No subscriptions, no sales calls. Just code and a place to explore.
Live evaluations use a shared server-side key and are provided while capacity is available. Inputs are sent through Vercel AI Gateway to TypeSafe. Sysone does not intentionally store submitted text, run results, or API keys in browser storage, and has no application database for them. Infrastructure and providers may retain logs under their own policies. This is an independent project, not an official TypeSafe or Vercel website.