Search

From Democrite to MARI: bringing a multi-agent framework back to life



How I restored, hardened and relaunched the distributed AI framework that Micka and I started in 2022.

WITH OPEN 5.5 (I LOVE IT)

Where it all started

In 2022, my friend Mickael Thumerel and I built the first version of Democrite: a framework to run many AI agents together, on a cluster, as if they were one system. Over the years it grew into a real open-source project on top of .NET and Microsoft Orleans, with sequences, triggers, signals, doors, streams and a shared blackboard.

In December 2024, Micka passed away. The project stopped with him. The code was still there, scattered across archives and old repositories, but nobody was taking care of it anymore. This year I decided it deserved better than an archive folder.

Step 1: make it build again

The first surprise was that the code did not even compile. A whole part of the framework, the Artifacts that let agents run Python or Docker code, was simply missing: a too-broad .gitignore rule had silently excluded those source folders for years. I recovered the 27 missing files from an old archive, fixed the rule, and got a clean build.

The framework also depended on Elvex.Toolbox, Micka's personal utility library, pulled from NuGet. To make the project self-contained, I brought the Toolbox into the solution itself, renamed it, and switched every sample to reference the source projects instead of old packages. Micka's licence and credits stay in it, as they should.

Step 2: a full code review

Next came a systematic review of the whole codebase: about 87,500 lines of code, including 13,400 lines of tests. Every finding was marked directly in the code, then sorted by severity. In total there were 275 findings: 86 high, 159 medium and 30 low.

  • High: thread-safety issues, locks that were never released, vulnerable dependencies (MessagePack was updated to a patched version), unsafe process arguments, and a few real bugs hiding in the build pipelines. 82 of the 86 were fixed. The remaining four are about restricting which types can be deserialized, a design decision I want to make carefully rather than quickly.
  • Medium: correctness and robustness, such as equality that ignored part of the data, caches that grew forever, YAML parsing without limits, and error messages that printed nothing useful. Nearly all were fixed.
  • Low: typos in public APIs (with the old names kept as obsolete aliases), dead code, tests without assertions, and a shared build file that had been misspelled since day one. All 30 were fixed.

After every phase, I rebuilt the full solution, ran the test suite and launched the samples for real: web APIs, consoles, and the Python agents with Python 3.12. Today all 1,039 tests pass and every sample builds and runs.

Step 3: a new name, M-A-R-I

The original NuGet packages belonged to an account I can no longer manage. Rather than wait, I chose a fresh start: Democrite became M-A-R-I, and our company identity became Kaonomi. That meant renaming everything consistently: more than 1,500 files, 260 files and folders, namespaces, packages, documentation and even the Python package. The historical copyright stays in the licence, next to the new one, and the tribute to Micka in the README was left untouched, word for word.

M-A-R-I is released as version 1.0.0: a stable, documented, open-source base under the MIT licence, running on Linux, Windows and macOS.

Step 4: putting it to work

A framework is only worth what you build with it. My own multi-agent chatbot, KAONOMI, now runs on M-A-R-I 1.0.0: a pipeline of 13 agents handles every message, from guardrails and entity extraction to model selection and an emotion engine, with local LLMs underneath. Migrating it was a good real-world test. It also revealed one useful breaking change: M-A-R-I now enforces lowercase identifiers for its definitions, which the old version silently accepted.



What I learned

  • An old codebase hides more than bugs. A single ignore rule can quietly delete part of a project for years.
  • Review everything, then verify everything. Fixes are only finished when the tests and the real samples run again.
  • Keep the history honest. Renaming a project does not erase where it comes from.
  • Working with an AI coding assistant changes the scale of what one person can do. Reviewing, fixing and verifying a framework of this size would have taken me months alone.

What's next

The MARI packages are being published on NuGet, the code lives on GitHub, and the open design questions, such as type allow-lists for deserialization, are next on my list. If you build distributed or multi-agent AI systems, I would love you to try it, open issues and contribute.

Micka, this one is for you.


MARI on GitHub Kaonomi.net

You may like these posts: