Blog / news
MoonBit 1.0: an AI agent language with proofs built in
, 5 min read
IDEA Research Institute released MoonBit 1.0 in November 2026, a general-purpose language built with AI agents in mind. Zhang Hongbo's team has worked on it since October 2022, and the 1.0 launch happened at the sixth IDEA conference. The headline number: the same model used 12% fewer tokens to build a database engine in MoonBit than in Rust.
What happened
MoonBit's team framed the release around two questions for anyone shipping code written by an agent. Where should that code run, and how do you check that it does what it was supposed to do?
- A WebAssembly-based sandbox isolates generated code during execution. The team reported startup times on the order of microseconds.
- A logic language for mathematical proofs is built into the language, so an agent can supply a correctness proof alongside its code. The team said verification can also extend to the assembly the compiler produces.
- On a workload spanning hundreds of packages, the team reported MoonBit taking one-tenth as long as Rust to compile, and finishing faster than Go.
IDEA founding chair Harry Shum presented the release as an example of rethinking computer science for AI. His view is that an agent's choice of programming language can affect the software it is able to deliver.
The team tested that idea in a limited way. It had Opus 5.5 build a database engine in both MoonBit and Rust across three rounds and about 500 tests. Test pass rates came out nearly identical. The model used 12% fewer tokens with MoonBit, even though the team estimated its MoonBit training material was only 1% as extensive as its Rust material.
That result is narrow. It covers one model working on one task, and the team said it does not establish a general advantage over Rust.
The scale claims go further. The team described a 17 MB office document processing tool built from 880,000 lines of MoonBit, and said incremental compilation takes one to two seconds at the million-line scale.
Adoption numbers, according to Zhang: the library ecosystem grew from roughly 2,500 packages at the start of 2026 to 36,000 by the conference. Downloads approached 10 million over the previous six months, including nearly 3 million in the most recent month. Those are download counts, not counts of distinct users. Peking University has put MoonBit into a graduate course, and the team said agent developers outside China are already using it in products.
Background
If you have not shipped anything with an agent yet, the problem MoonBit aims at can sound abstract. It is not. When a model writes code for you, two things get hard: running that code without trusting it, and knowing whether it is correct before it touches real data.
A sandbox handles the first part. WebAssembly is a format for running code inside a contained environment, the same basic idea browsers use for untrusted pages. MoonBit uses it so a generated program can start fast and stay boxed in. Microsecond startup matters if your agent generates and runs hundreds of small programs in a loop, because the usual startup cost adds up.
Formal verification handles the second part. MoonBit includes a logic language, so a proof can live in the same project as the code and be checked by a program rather than a person. The team stated one limit directly: support for proofs does not mean every generated program comes with one.
MoonBit is a general-purpose language, so it is not restricted to agent work. The team has been building it since October 2022, which makes it about four years old at version 1.0.
Why the MoonBit 1.0 AI agent language matters
For developers, the practical effects are cost and loop speed.
Token count is money. If a model really does need 12% fewer tokens on some tasks, that is a real bill reduction at scale. The team's own caveat still stands, so the number is a reason to test, not a reason to move a codebase.
Compile speed is iteration speed. One-tenth the compile time of Rust on a package-heavy build, and incremental builds of one to two seconds at a million lines, is the difference between an agent that can try, fail and retry in a loop and one that waits.
The sandbox matters most if you already run generated code. Wire a small web service or a chat bot up to a model and there comes a moment when the model's output has to execute somewhere. That is the part MoonBit is trying to make boring.
One thing the numbers do not show is whether any of this holds outside the team's own tests. A 12% token saving on a single task is a hint, not a benchmark you can plan a budget around.
What comes next
The release itself is out. What the team did not give is a timeline for anything else.
The proof system is the biggest open question. Proofs exist and can be checked, but the team did not claim that agents write them reliably. Whether a model can produce a proof for a non-trivial program is still something to test.
A second demo at the same conference tackled the part isolation cannot fix. Wang Jiaping's security team showed a hardware prototype that lets an agent call a cloud model while keeping credentials and tool execution on the user's device. It combines local data redaction with a trusted execution domain, uses three main chips, and has a bill of materials below 1,000 yuan. Unlike MoonBit 1.0, that was a prototype, not a product release.
So the split is clear. MoonBit isolates the code an agent generates. The prototype addresses where an agent is allowed to use sensitive data to act on someone's behalf. Both are early, and neither answers the other's question yet.
Sources
- IDEA releases MoonBit 1.0, a programming language designed for AI agents - Logic Foundry, logicfoundry.app, 2026-11-26