v161-alpha.1 is out, and it covers everything since v147. The two big additions are the AI library and vary prove. The release notes list everything. Here is what we'd point you at first.
Calling a model usually means sending a string out and hoping the string that comes back is parseable. The bundled ai library puts types and limits around that. One AiContext holds what a workflow may do (a Judge for yes/no questions, a Router for picking, a Generator for text), plus its budget, policy, and trace.
The compiler understands it. ai using gives a block its context, and feels asks the Judge a question:
ai using context {
if content feels "contains a personal attack" with threshold 90% {
return Ok(ReviewDecision.Flag)
} uncertain {
return Ok(ReviewDecision.HumanReview)
} else {
return Ok(ReviewDecision.Clear)
}
}
The uncertain branch is required, so "not sure" can't quietly become "no". And the compiler checks that the context has every capability the block might use before the first call, even in branches that never run.
| Piece | What it does |
|---|---|
| Adapters | Translate to one provider's protocol and return typed evidence. Swapping the endpoint doesn't change your workflow. |
| Budgets | Attempts, deadline, and iterations are shared across nested helpers. Retries spend attempts too. |
| Typed outcomes | Uncertainty, provider failure, malformed responses, and an empty budget are different results. |
| Native evals | eval declares typed cases, a pure scorer, and gates. vary eval runs them from fixtures or live and writes a report. |
| Bundled libraries | ai and a typed Jev client ship inside the CLI. Import them with no dependency setup. |
Start with the AI library intro, then the library docs, semantic control flow, and native evals. Jev AI with Vary has a worked example. One caveat: we have only run a workflow live against the direct TypeSafe endpoint. Check other models yourself.
vary prove takes the in and out contracts you already write and asks a solver whether they hold for every input. You get a proof, or an input that breaks the function. New here? Write your first proofs.
The big change is that it now handles real code, not just small examples. The story of running it over our own standard library is in this article.
| Situation | What the report does |
|---|---|
| A call or type the prover can't model | Treats the result as unconstrained and lists an opaque: assumption. |
| One unsupported construct | Marks only the obligations on its path. The rest is still proven. |
Missing modifies or decreases | Infers them and says so. |
| A counterexample that doesn't reproduce | Reports unknown, never refuted. |
| Richer types | Datatypes, nested lists and dicts, Set, enum payloads, and imported data classes are modelled. Float and Decimal need Z3 or cvc5. |
Standard library functions now carry contracts, and extern def lets you write an axiom for foreign code. See solvers, and wrong code that looks right for why any of this matters.
| Change | In short |
|---|---|
| Readable blocks | let { } and mut { } group related bindings. do, collect, with, and attempt keep their names local. |
let ... else | Unwrap an optional or leave in one statement, and the name is narrowed after it. See errors. |
Never | Functions that can't return say so with -> Never. See types. |
| Optional helpers | map, and_then, and filter on optionals. |
| Check rules | Over a hundred now. The new ones nudge toward the forms above. |
| Change | In short |
|---|---|
| Formatter | One style, no settings. We reformatted the whole repository with it. |
| vary var | Tells you or your coding agent what to check next. It can run as a Stop hook so an agent can't call a task done early. |
vary new --agent | Scaffolds a project with a skill pack for Claude Code, Codex, Cursor, OpenCode, or Kiro. See the CLI reference. |
| Codegen | JVM code generation is now its own module behind a VaryCodegen facade. Still experimental. |
| Packaging | macOS and Windows archives now bundle Z3, so vary prove runs from them. All platforms ship Temurin 25.0.5. |
Try it with the getting started guide, and tell us which functions vary prove can't handle yet.