Leanstral - Mistral AI's first open-source AI code agent
Leanstral is Mistral AI's first open-source AI code agent, designed specifically for proving Lean 4 theorems. The model employs a sparse architecture with 120B total parameters and 6B activation parameters, and can automatically generate formal proofs and verify code...
What is Leanstral?
Leanstral is Mistral AI's first open-source AI code agent, designed specifically for proving Lean 4 theorems. The model employs a sparse architecture with 120B total parameters and 6B activation parameters, automatically generating formal proofs and verifying code correctness. Compared to its giant competitors, Leanstral achieves higher efficiency at a very low cost ($18 per test) and performs exceptionally well in benchmarks against real-world mathematical codebases such as the Fermat's Last Theorem project. The model supports extensions via the MCP protocol and is integrated into the Mistral Vibe platform.
Leanstral's main functions
-
Automatic formal proof generationFor Lean 4 proof assistant, automatically generate rigorous mathematical proofs and software specification verification code.
-
Code correctness verificationLean 4's complete validator ensures that the generated code conforms to strict formal specifications, eliminating the bottleneck of manual review.
-
Intelligent Diagnosis and RepairSupports analysis of code failure reasons (such as identification)
defandabbrev(Differences in type aliases) provide precise fixes. -
Cross-language conversionSupports automatic conversion of other proof languages (such as Rocq/Coq) to Lean 4 code, while preserving custom symbol representations.
-
Theorem ProofsFormal proofs and definitions of new mathematical concepts are completed in real mathematical codebases (such as the Fermat's Last Theorem project).
Key information and usage requirements for Leanstral
- DeveloperMistral AI
- positionThe first open-source AI code agent designed specifically for Lean 4
- ArchitectureSparse expert hybrid (MoE), 120B total parameters / 6B activation parameters
- licenseApache 2.0 (completely open source)
- costSingle entry: $18; Pass@2: $36 (compared to Claude Sonnet $549)
- performanceFLTEval score of 29.3 (pass@4), surpassing most open-source competitors.
- Mistral VibeZero-configuration integration; simply type /leanstall to use.
- Labs APIFree/low-cost endpoint labs-leanstral-2603 (available for a limited time)
- Local deploymentDownload the open-source weights and run them yourself.
Leanstral's core advantages
-
Ultimate efficiencyIt surpasses open-source models with hundreds of billions of activation parameters with only 6B, achieving the best balance between performance and cost.
-
Cost RevolutionFor just $18 per task, you can achieve better validation results at 1/15 the price of Claude Sonnet.
-
Fully open sourceIt uses the Apache 2.0 license to open weights, eliminate vendor lock-in, and support private deployment and independent control.
-
Vertical optimization: Specifically trained for Lean 4 proof engineering, it outperforms general large models in real mathematical codebases.
-
Trusted verificationIt supports generating code with formal mathematical proofs, transforming the bottleneck of manual review into automatic machine verification.
-
Eco-compatibleIt natively supports the MCP protocol and can be seamlessly integrated with existing development toolchains and language servers.
How to use Leanstral
- Mistral Vibe (Recommended for beginners)Access the Mistral Vibe platform and enter the following in the chat:
/leanstallIt can be started with zero configuration using a command, without the need to install any local environment. - Labs API (Developers)Calling the API endpoint
labs-leanstral-2603It is currently available for free for a limited time and is suitable for integration into automated workflows or self-built applications. - Local deployment (advanced users)Download the Apache 2.0 licensed model weights from official channels and run them independently on your own hardware to achieve complete data privacy and control.
- Usage Recommendations:Cooperate
lean-lsp-mcpThe tool offers optimal performance and is suitable for scenarios such as formal mathematical proofs and high-confidence software verification.
Leanstral's project address
- Project official websitehttps://mistral.ai/news/leanstral
Leanstral's Competitive Comparison
| Comparison Dimensions | Model | scale | FLTEval score | cost | Features |
|---|---|---|---|---|---|
| Leanstral | Leanstral-120B-A6B | 120B/6B | 26.3 (pass@2) 29.3 (pass@4) 31.9 (pass@16) |
$18-$290 | Optimized specifically for Lean 4, open source, MCP extension |
| Open source competitors | Qwen3.5-397B-A17B | 397B/17B | 25.4 (pass@4) | – | It takes 4 rounds to achieve the same effect as Leanstral in 2 rounds. |
| Kimi-K2.5-1T-A32B | 1T/32B | 20.1 (pass@4) | – | Huge scale but obvious scoring bottleneck | |
| GLM5-744B-A40B | 744B/40B | 16.6 (pass@4) | – | Largest parameters but worst performance | |
| Closed-source competitors | Claude Opus 4.6 | – | 39.6 | $1,650 | Highest quality but costs 92 times more than Leanstral |
| Claude Sonnet 4.6 | – | 23.7 | $549 | It costs 15 times more than Leanstral and scores lower. | |
| Claude Haiku 4.5 | – | 23.0 | $184 | Mediocre value for money |
Application scenarios of Leanstral
- Formal mathematical proofIt can automatically complete formal proofs and correctly define new mathematical concepts in large-scale mathematical projects such as Fermat's Last Theorem.
- Highly Reliable Software VerificationVerify the strict properties of code snippets in programming languages such as Rust to ensure the correctness of software in mission-critical systems.
- Codebase migration adaptationDiagnose and repair destructive changes caused by Lean version upgrades, such as automatic identification.
defandabbrevDifferences in type aliases are identified and repairs are provided. - Cross-language code conversionIt completely converts other proof language code such as Rocq/Coq into Lean 4, preserving custom symbol representations and logical structures.
- Intelligent debugging and diagnosisThe model supports analyzing the root cause of compilation failures, automatically generating test cases to reproduce the problem, and providing precise repair solutions and explanations of the underlying principles.