FlowtandBriefAI · Software · ResearchMeet Flowtand

Mistral Releases Leanstral, an Open-Source Code Agent for Lean 4

Announcement

Mistral AI

Browse Models topic page →

Mistral announced Leanstral, which it describes as the first open-source code agent built for Lean 4. According to the publisher, the model has 6B active parameters, ships under Apache 2.0, and was trained to work inside realistic formal repositories. Mistral reports benchmark results on its own FLTEval suite, including parity or an edge over some larger models at lower stated cost, and says the weights, an API endpoint and a Vibe agent mode are available now.

What Mistral announced

Mistral published a post introducing Leanstral, described as the first open-source code agent designed for Lean 4. According to Mistral, the model has 6B active parameters in a sparse architecture, is released under Apache 2.0, and is available through an agent mode in Mistral Vibe and a free API endpoint. Mistral says the model was trained for realistic formal repositories and supports MCP tools, including lean-lsp-mcp. Its evaluation uses FLTEval, a suite Mistral says it will release, which scores completion of proofs and definitions across pull requests to the FLT project. Mistral reports that Leanstral reached 26.3 at pass@2 and 31.9 at pass@16, and lists run costs of $36 and $290 respectively, compared with $549 for Sonnet and $1,650 for Opus in its table. These are publisher-reported results from its own harness, not independent benchmarks.

A trial for a formal-methods team

A proof-engineering team maintaining a Lean 4 repository could try Leanstral as a drafting assistant on a bounded task: take a set of recent pull requests that required new definitions or filled in proofs, and ask the agent to propose complete proofs for them through MCP-connected Lean tooling. Because the Lean kernel checks each proof, a wrong suggestion is rejected rather than silently merged, so the team can compare agent output against a baseline of doing the same PRs by hand. The scenario fits work where a human already defines the specification and reviews the final diff, not where specifications themselves are unclear.

Steps and success checks

A team could try the following: pick roughly ten to twenty closed PRs of similar difficulty, record baseline time and pass rate to completion, then rerun them with Leanstral in Vibe or the API and the same Lean version. Measure accepted proofs per PR, number of attempts (mirroring the pass@N framing), wall-clock time, and reviewer effort. Failure checks: count proofs that compile only after weakening the statement, note any definitions the agent invented that change the intended meaning, and flag cases where it relies on tactics or libraries absent from the project. Keep a named reviewer signing off every merged proof, and stop the trial if rejection rates or review time exceed the baseline.

Trade-offs and when to skip

The appeal is cost and openness: Mistral reports strong results relative to larger closed models at lower stated run cost, and Apache 2.0 weights allow self-hosting. Prerequisites include a Lean 4 project with a working build, willingness to configure MCP tooling, and reviewers fluent enough in Lean to judge whether a proof matches the intended statement. Unknowns from this excerpt include performance on Lean versions released after training, behavior on very large repositories, and how the free API endpoint's limited-period access will change. Teams that cannot dedicate Lean-literate review, or that need guarantees beyond what the kernel plus a specification can express, should not adopt it yet.

Context and limitations

  • Based on a short source excerpt; the full article was not analyzed.
  • Benchmark figures and cost comparisons come from Mistral's own evaluation; independent testing is not reported.
  • Excerpt does not document limits of the model on out-of-distribution Lean versions or large repositories.
  • Based on bounded source text, not independent testing. Practical suggestions are editorial proposals.