The self-optimization loop shown by MiniMax connects failure trajectories, planning, scaffold changes, evaluation, comparison, and keep/rollback decisions. It can be reused for long-running Agents, but automated changes must be sandboxed and kept only when they pass test gates.
Suitable tasks: Long-running coding, experiment/training pipelines, log analysis, skill/tool harness iteration, and evaluation-driven Agents.
Unsuitable tasks: Directly allowing a production system to modify its own code or parameters; do not enable this without rollbackable versions, fixed evaluations, and human approval.
Applicable model version: MiniMax M2.7; the official case uses an internal harness, and the public API does not guarantee equivalent memory/skills/Agent Teams.
Applicable clients, Agents, or APIs: MiniMax Agent/API, custom OpenClaw/code Agents, runnable sandboxes, and version-control systems.
Recommended inference tier and parameters: The official blog does not disclose a complete sampling configuration; use temperature=1.0/top_p=.95/top_k=40 as a self-hosted starting point and scan against evaluations.
You are an engineering optimization agent constrained by a sandbox.
Follow these steps strictly in every round:
1. Read the previous round's short-term memory, failure trajectories, and current evaluation results.
2. Propose only one auditable change hypothesis, and list its expected impact and rollback conditions.
3. Modify only isolated scaffold/skills/memory files; do not modify production credentials, data, or the test baseline.
4. Run the preregistered evaluation set and smoke tests.
5. Write the "change, tests, metrics, errors, and whether to keep" to this round's memory Markdown.
6. Keep the change only when the primary metric improves with no regressions; otherwise roll it back automatically.
7. Stop and output a report when the round count, budget, or consecutive-no-improvement threshold is reached.
Output fields:
- hypothesis
- changed_files
- evaluation_command
- before_after_metrics
- regressions
- keep_or_revert
- next_stepFix the benchmark, test set, random seed, metrics, and maximum iteration count, then establish a baseline.
Run the loop “analyze failure trajectories → plan changes → modify scaffold → evaluate → compare → keep/rollback.”
Generate short-term memory Markdown and self-critique each round; put the files under version control but prohibit changes to the original evaluation set.
Run smoke tests, unit tests, permission scans, and tool-call regression tests; roll back immediately after any regression.
Report metrics and cost for every round, and do not extrapolate the internal “30% improvement” into a general improvement for the public model.
MiniMax says that internally it had M2.7 update memory, build skills, and improve a learning harness; one programming scaffold's autonomous loop exceeded 100 rounds, with a 30% improvement in internal evaluation.
The three components made public by MiniMax are short-term memory, self-feedback, and self-optimization; each round generates short-term memory Markdown and continues optimizing based on memories/feedback from earlier rounds.
The official ML Bench Lite exploration used 22 competitions, 3 trials, and 24 hours per trial; the best run achieved 9 gold, 5 silver, and 1 bronze, while the three-trial average medal rate was 66.6%.
The official research Agent workflow covers literature review, experiment specs, data pipelines, experiment launch/monitoring, log reading, debugging, metric analysis, code fixes, MRs, and smoke tests, and says the internal workflow can handle 30%–50%.
All “30%,” “66.6%,” and “30%–50%” figures come from MiniMax's internal/official cases; the complete datasets, harnesses, variance, and details of human participation were not disclosed.
The self-optimization targets the harness/skills/memory, not model-weight retraining; it must not be advertised as a general capability for models to learn autonomously.
The public API does not automatically provide internal Agent Teams, memory, dynamic tool search, or a training environment; these must be implemented and security-audited separately.
Any automatic keep/rollback policy must guard against evaluation leakage, metric gaming, malicious tool calls, and data contamination.
The official source summarizes the core loop as “analyze failure trajectories → plan changes → modify scaffold code → run evaluations → compare results → decide to keep or revert changes” (compliance-short quotation, 11 short-phrase words or fewer).
MiniMax M2.7