MathModelAgent is an open-source AI agent that automates mathematical modeling competitions end to end, producing a complete, submission-ready paper. It has about 6,200 stars on GitHub and was actively developed in 2026.
MathModelAgent breaks a modeling contest into specialized roles โ a modeler, a coder, and a paper writer โ and lets each agent use a different LLM through LiteLLM, so any model can be plugged in. Code runs in a local Jupyter-based interpreter or in cloud sandboxes via E2B and Daytona, a RAG knowledge base (ChromaDB with reranking) supplies modeling methods and writing references, and web search through Tavily brings in real data. Human-in-the-loop checkpoints pause at key stages with six decision actions, and a four-layer fault-tolerance design keeps long runs alive. The current skills-based version adds 17 Typst paper templates for major competitions and a nine-step verification pass covering numeric consistency and compilation before delivery, and a desktop edition bundles everything so users only need to add an API key.
MathModelAgent is open source and free for personal use โ commercial use requires contacting the author. You supply your own model API keys, and a hosted online version is available on the official site.
Students and teams entering mathematical modeling competitions such as MCM/ICM and national contests who want to compress days of modeling, coding, and typesetting into hours.