# mathmodelagent | Sanjin | Knowledge Base | Instagit

🤖📐专为数学建模设计的 Agent ,自动完成数学建模，生成一份完整的可以直接提交的论文。 An Agent Designed for Mathematical Modeling ,Automatically complete mathmodel and generate a complete paper ready for submission.

GitHub Stars: 1.6k

Repository: https://github.com/jihe520/mathmodelagent

---

## Articles

### [How Notebook Serialization Preserves Code Execution History in MathModelAgent](/jihe520/mathmodelagent/how-notebook-serialization-preserves-execution-history)

Discover how MathModelAgent preserves code execution history through notebook serialization. Learn how the NotebookSerializer captures cells, outputs, errors, and images in real-time.

- Tags: internals
- Published: 2026-03-04

### [MathModelAgent Docker Deployment: Complete Guide to Docker Compose Setup](/jihe520/mathmodelagent/how-to-deploy-mathmodelagent-with-docker-compose)

Easily deploy MathModelAgent with Docker Compose. Clone the repository and run a single command to launch Redis, FastAPI, and Vue containers for development with hot-reloading.

- Tags: how-to-guide
- Published: 2026-03-04

### [Understanding Retry Mechanisms in MathModelAgent: MAX_RETRIES and MAX_CHAT_TURNS Explained](/jihe520/mathmodelagent/mathmodelagent-retry-mechanism-max-retries-max-chat-turns)

Discover MathModelAgent's retry mechanisms including MAX_RETRIES and MAX_CHAT_TURNS. Learn how these controls manage LLM dialogue and code execution for robust performance.

- Tags: deep-dive
- Published: 2026-03-04

### [How to Configure CORS Settings for Cross-Origin Requests in the FastAPI Backend](/jihe520/mathmodelagent/how-to-configure-cors-settings-fastapi)

Learn to configure CORS settings for your FastAPI backend. Easily manage cross-origin requests by setting the CORS_ALLOW_ORIGINS environment variable for secure and flexible API access.

- Tags: how-to-guide
- Published: 2026-03-04

### [How the Vue 3 WebSocket Client Manages Real-Time Task Updates in MathModelAgent](/jihe520/mathmodelagent/vue3-frontend-websocket-client-updates)

Learn how the Vue 3 WebSocket client in MathModelAgent uses a custom wrapper and Pinia for real-time task updates, leveraging Vue 3 reactivity for seamless UI changes.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Add New Agents to the MathModelAgent Multi-Agent System: A Step-by-Step Guide](/jihe520/mathmodelagent/how-to-add-new-agents-to-mathmodelagent)

Learn how to add new agents to the MathModelAgent multi-agent system. Follow this step-by-step guide to subclass, register, and integrate your custom agents easily.

- Tags: how-to-guide
- Published: 2026-03-04

### [OpenAlexScholar Integration Process for Literature Citations in MathModelAgent](/jihe520/mathmodelagent/openalexscholar-integration-for-literature-citations)

Integrate OpenAlexScholar into MathModelAgent for literature citations. Discover the process: email validation, API setup, paper search, caching, and citation injection for academic papers.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Implement Custom Code Interpreters with the InterpreterFactory in MathModelAgent](/jihe520/mathmodelagent/how-to-implement-custom-code-interpreters-interpreterfactory)

Learn to implement custom code interpreters in MathModelAgent by subclassing BaseCodeInterpreter and registering with InterpreterFactory. Enhance your agent's capabilities today.

- Tags: how-to-guide
- Published: 2026-03-04

### [How ModelerAgent Analyzes Problems and Constructs Mathematical Models in jihe520/mathmodelagent](/jihe520/mathmodelagent/modeleragent-problem-analysis-and-mathematical-modeling)

Discover how ModelerAgent analyzes problems and constructs mathematical models by transforming user questions into structured plans via a three-stage LLM workflow. Learn more.

- Tags: deep-dive
- Published: 2026-03-04

### [How CoordinatorAgent Breaks Down User Problems into Actionable Subtasks](/jihe520/mathmodelagent/coordinatoragent-problem-decomposition-into-subtasks)

Learn how the CoordinatorAgent breaks down user problems into actionable subtasks by using an LLM to extract questions and structure responses. Discover the process today.

- Tags: deep-dive
- Published: 2026-03-04

### [How WriterAgent Generates Formatted Academic Papers from Modeling Results in MathModelAgent](/jihe520/mathmodelagent/writeragent-academic-paper-generation)

Discover how WriterAgent uses LLM conversations and tool integrations to automatically generate formatted academic papers from modeling results within MathModelAgent.

- Tags: how-to-guide
- Published: 2026-03-04

### [CoderAgent Capabilities in MathModelAgent: Execute Code, Capture Output, and Recover from Errors](/jihe520/mathmodelagent/coderagent-code-execution-and-error-handling)

Explore CoderAgent capabilities in MathModelAgent. Execute Python, stream output, and recover from errors with advanced retry logic for seamless mathematical modeling.

- Tags: deep-dive
- Published: 2026-03-04

### [How to Configure LiteLLM for Multi-Provider LLM Support in MathModelAgent](/jihe520/mathmodelagent/how-to-configure-litellm-for-multi-provider-llm)

Configure LiteLLM for multi-provider LLM support in MathModelAgent. Seamlessly switch between OpenAI, Anthropic, and Groq without code changes using environment variables.

- Tags: how-to-guide
- Published: 2026-03-04

### [MathModelAgent Work Directory Structure: Standard Layout for Modeling Tasks](/jihe520/mathmodelagent/mathmodelagent-work-directory-structure)

Understand the standard MathModelAgent work directory structure at backend project work dir task id. Learn about notebook.ipynb execution logs and res.md for your final report.

- Tags: how-to-guide
- Published: 2026-03-04

### [How MathModelWorkFlow Orchestrates the Mathematical Modeling Process in jihe520/mathmodelagent](/jihe520/mathmodelagent/how-mathmodelworkflow-orchestrates-modeling-process)

Discover how MathModelWorkFlow in jihe520/mathmodelagent orchestrates mathematical modeling. This guide explores its state machine and LLM agents for creating competition-ready reports efficiently. Learn more today.

- Tags: how-to-guide
- Published: 2026-03-04

### [How to Customize Prompt Templates Using the md_template.toml File in MathModelAgent](/jihe520/mathmodelagent/how-to-customize-prompt-templates-md_template.toml)

Easily customize prompt templates in MathModelAgent by editing the md_template.toml file. Learn how to modify writer-agent prompts for personalized interactions.

- Tags: how-to-guide
- Published: 2026-03-04

### [Agent Memory Management and Summarization in MathModelAgent: Implementation and Code](/jihe520/mathmodelagent/agent-memory-management-and-summarization-in-mathmodelagent)

Discover how MathModelAgent manages its memory with a rolling window and LLM summarization. Learn about its efficient bounded memory system and code implementation.

- Tags: internals
- Published: 2026-03-04

### [How Redis Manages Task State and Broadcasts WebSocket Messages in MathModelAgent](/jihe520/mathmodelagent/how-redis-manages-task-state-and-websocket-messaging)

Discover how MathModelAgent uses Redis for efficient task state management and real-time WebSocket message broadcasting. Learn about Redis Pub/Sub for instant updates.

- Tags: internals
- Published: 2026-03-04

### [How to Integrate E2B or Daytona Cloud Code Interpreters into MathModelAgent](/jihe520/mathmodelagent/how-to-integrate-e2b-or-daytona-code-interpreters)

Integrate E2B or Daytona cloud code interpreters into MathModelAgent. Set E2B_API_KEY or extend interpreter_factory.py for custom Daytona interpreter integration.

- Tags: how-to-guide
- Published: 2026-03-04

### [How the Local Jupyter-Based Code Interpreter Functions in MathModelAgent](/jihe520/mathmodelagent/how-does-local-jupyter-code-interpreter-work)

Discover how MathModelAgent's local Jupyter-based code interpreter works. It runs Python code in isolation and saves every interaction to a notebook file post-execution.

- Tags: internals
- Published: 2026-03-04

### [How to Configure Different LLM Models for Each Agent in MathModelAgent Using Environment Variables](/jihe520/mathmodelagent/how-to-configure-different-llm-models-per-agent)

Learn how to configure different LLM models for each agent in MathModelAgent using environment variables. Easily switch LLM providers without code changes.

- Tags: how-to-guide
- Published: 2026-03-04

### [How the Multi-Agent Architecture in MathModelAgent Works: Coordinator, Modeler, Coder, and Writer](/jihe520/mathmodelagent/how-does-mathmodelagent-multi-agent-architecture-work)

Discover how MathModelAgent's multi-agent architecture with Coordinator, Modeler, Coder, and Writer agents transforms math problems into code and papers using DTOs.

- Tags: deep-dive
- Published: 2026-03-04

