MathModelAgent  by jihe520

Agent for math modeling, generating ready-to-submit papers

created 6 months ago
654 stars

Top 52.0% on sourcepulse

GitHubView on GitHub
Project Summary

MathModelAgent is an AI-powered agent designed to automate the entire mathematical modeling process, from problem analysis and code generation to error correction and final paper writing. It targets students and researchers involved in mathematical modeling competitions or academic work, aiming to significantly reduce the time required to produce a submission-ready paper.

How It Works

The agent employs a multi-agent, multi-LLM architecture. Specialized agents handle distinct tasks: a "modeling agent" for problem analysis and model formulation, a "coding agent" (incorporating a reflection module and local code interpreter) for implementation and debugging, and a "paper writing agent" for generating the final document. Utilizing different LLMs for each agent allows for leveraging the strengths of various models, while the local code interpreter enables direct execution and debugging of generated code.

Quick Start & Requirements

  • Install: Clone the repository, then navigate to backend and frontend directories.
  • Backend: Install uv (pip install uv), sync dependencies (uv sync), activate virtual environment, and run ENV=DEV uvicorn app.main:app --host 0.0.0.0 --port 8000 ....
  • Frontend: Install pnpm globally, then run pnpm i and pnpm run dev.
  • Prerequisites: Python, Node.js, Redis, and a litellm.ai compatible LLM API key.
  • Configuration: Copy .env.dev.example to .env.dev in backend and .env.example to .env in frontend, filling in API keys and model configurations.
  • Output: Results are saved in backend/project/work_dir/xxx/.

Highlighted Details

  • Automates problem analysis, mathematical modeling, code generation, error correction, and paper writing.
  • Features a local code interpreter for direct code execution and debugging.
  • Employs a multi-agent and multi-LLM approach for specialized task handling.
  • Aims for low cost per task (estimated ~1 RMB).

Maintenance & Community

The project is in an experimental, iterative demo phase with ongoing development and bug fixing. The author is actively working on improvements. A QQ group (699970403) is available for questions and community interaction.

Licensing & Compatibility

Personal use is free. Commercial use requires direct contact with the author.

Limitations & Caveats

The project is explicitly stated to be in an experimental and exploratory phase with many areas for improvement and optimization. The author notes they are busy and updates may be infrequent. English support for competitions like the American Mathematics Competitions (MuiSai) is planned but not yet complete.

Health Check
Last commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
621 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.