MathModelAgent

Multi-agent pipeline for contest teams: problem analysis, notebook code, and a formatted paper

Category
AI agents & assistants
Audience
Data & ML
Language
Python

Published · Updated

MathModelAgent is an open-source multi-agent system that carries a mathematical modeling competition entry from the problem statement to a finished, submission-ready paper. It is built for students and teams who enter modeling contests on a deadline, and it will also interest developers who want to see a practical division of labor between several LLM agents. The project is written in Python, has been public since January 2025, and has collected over 5,000 stars on GitHub.

What it does

The stated goal is blunt: turn three days of competition into about an hour of work. To get there, the project automates the whole chain a contest entry normally requires.

  • Analyzes the problem, proposes the modeling approach, writes code, corrects its own errors, and drafts the paper.
  • Splits those jobs across separate agents — a modeling agent, a coding agent, a writing agent — rather than asking one model to do everything.
  • Runs a code interpreter, either locally on Jupyter (so the work is saved as a notebook you can keep editing) or in a cloud sandbox through E2B or Daytona.
  • Formats the result into one of seventeen contest templates, so the output is a laid-out document rather than a pile of text.
  • Applies nine automatic checks aimed at catching numbers that do not add up between sections.
  • Supports web search during the run.

The paper itself is produced through Typst, but you never have to write Typst yourself — the formatting is handled for you.

How it works

Two design choices stand out. First, the pipeline is described as "workflow agentless": it does not sit on top of a general agent framework, which the authors present as the reason it stays cheap to run. The work is broken into subtasks, and a prompt-injection mechanism lets you attach custom requirements to each subtask individually, which is how you adapt it to a particular competition's rules or to your own preferred modeling style.

Second, models are pluggable per role. Every agent can be pointed at a different model, and provider access goes through litellm, so in principle any model litellm supports will work. That matters in practice: the coding agent and the writing agent have very different cost and quality profiles, and being able to mix a strong model for modeling with a cheaper one for prose is part of how the cost stays down.

The desktop build packages Claude Code together with the project's full set of SKILLS, so the agent behavior ships preconfigured rather than being something you assemble.

Getting started

The maintainers recommend the desktop application over a source install. Builds are published on the Releases page: a .dmg for Apple-silicon Macs, a separate .dmg for Intel Macs, and a 64-bit .exe for Windows. The desktop version bundles Claude Code and the SKILLS set, so there is no Python, Node.js or Redis to install and no skill configuration to do by hand — you install it, paste in one model API key, and start modeling.

Two practical notes from the README. The macOS packages are signed with a Developer ID and notarized by Apple, and macOS gets automatic updates. The Windows installer is currently unsigned, so Microsoft Defender SmartScreen will warn on first run and you have to pick "More info" then "Run anyway"; Windows auto-update is waiting on a code-signing certificate. Download only from the official Releases page.

If you would rather deploy it yourself or contribute, the repository documents the SKILLS layout and a usage tutorial for running from source.

When to use it / when not

This is a good fit when you are in a timed modeling contest, you need a formatted document at the end rather than just working code, and you are prepared to read what the agent produced before submitting it. The notebook output helps here — you can open what the coding agent wrote, rerun it, and fix anything that looks wrong.

It is a poor fit if you need guaranteed-correct novel modeling with no human review. Nine consistency checks reduce the number of obviously broken figures; they do not verify that the model you got is the right model for the problem, and the quality of everything depends on which LLMs you point it at and how much you are willing to spend on API calls. It is also not a general-purpose data-science environment: the whole design is shaped around the competition paper as the deliverable.

Anyone who competes in mathematical modeling contests should look at this seriously — it is the rare agent project with a sharply defined output format and a desktop build that removes the setup tax. Developers building multi-agent systems have a second reason to read the code: the deliberately framework-free, subtask-with-injected-prompts structure is a clear, low-cost alternative to the heavier agent stacks, and the per-agent model routing is a pattern worth stealing.

More in AI agents & assistants