Why Agent Evolution Requires Co-Optimizing Weights and Frameworks
This article explains why improving an AI agent by training the model alone eventually hits a ceiling, and why weights and the runtime framework (harness) must be optimized together. It covers a representative evaluation design with dual modification channels, resource and budget constraints, tiered data visibility, and a normalized weighted scoring mechanism, then translates these findings into practical engineering methods: failure attribution first, high-value framework改造 such as layered context and structured tool returns, low-risk parameter-efficient weight updates, and an iterative rhythm of framework-first, weights-follow. It also lists common pitfalls and engineering recommendations for building reproducible, comparable agent self-improvement loops.
Why Agent Evolution Requires Co-Optimizing Weights and Frameworks
1. The Problem: Why “Just Changing the Model” Hits a Ceiling
In the engineering practice of agent systems, a common misconception is to equate “self-evolution” with “continuing to train the model.” Teams pour resources into instruction fine-tuning, preference alignment, or parameter-efficient updates, only to see limited gains in online task success rates. The reason is not mysterious: an agent’s final performance is determined jointly by two categories of factors.
The first is weights — the knowledge and behavioral tendencies internalized in the underlying large model. The second is the runtime framework (harness), which handles the orchestration of tool calls, the organization of context, retries and fallbacks after failures, branch control of the execution flow, and the validation and aggregation of results.
If the framework itself is flawed — for example, context is crowded out by irrelevant history, error messages returned by tools are not parsed structurally, or long tasks lack intermediate checkpoints — then no matter how strong the weights are, correct results cannot be produced reliably. Conversely, if the weights do not understand instructions well, even the most refined process orchestration is just post-processing on top of wrong answers. Therefore, genuine agent evolution must be co-optimization of weights and framework.
2. Evaluation Design: Turning “Dual-Channel Modification” into Measurable Tasks
A representative evaluation approach is to have the “researcher agent” under study develop another “target agent,” while opening two modification channels at the same time:
- Weight channel: allows training or parameter updates to the target model;
- Framework channel: allows modifying the runtime framework that manages tool calls, context organization, and the execution flow.
2.1 Resource and Budget Constraints
The evaluation deliberately sets hard constraints that mirror real engineering:
- Each development cycle is limited to 24 hours;
- Compute is capped at four accelerator cards;
- The external teacher model call budget is fixed at 100 USD.
The point of these three constraints is that evolution cannot win by piling on unlimited resources; it must make trade-offs within budget — spend compute on training, or spend the budget on distillation; rewrite the flow, or supplement the data.
2.2 Tiered Data Visibility
- Visible set: provides task descriptions and full execution traces, usable for analyzing failure modes;
- Selection set: returns only scores, not traces, used by the model itself to screen candidate solutions;
- Test set: fully independent; the final “weights + framework” pair is submitted and evaluated together.
This design effectively suppresses overfitting to the evaluation set and forces the agent to build its own validation loop.
2.3 Key Distinction: Researcher Capability ≠ Target Score
The evaluation clearly separates two concepts: the development capability of the researcher agent, and the final test score of the target agent. A researcher who is good at writing training scripts does not necessarily deliver a high-performance target system, and vice versa. The lesson for engineering teams is that R&D effectiveness and delivery quality need to be measured separately.
3. Scoring: How to Read the Normalized Weighted Score
Take a certain target base model as an example: a delivered system scored 31.23 on the normalized weighted metric, the initial system scored 1.09, and the baseline of “instruction fine-tuning on the target + a reference framework” scored 37.42.
It should be emphasized that 31.23 is not a simple average of per-task scores; it is a weighted result synthesized according to task difficulty, weights, and the normalization scheme. Three points matter when reading such metrics:
- Normalization means the score is a relative quantity, and cannot be compared directly across different base models or different evaluation versions;
- Weighting means high-weight tasks pull the total score more strongly, so the breakdown should be examined to understand the structure;
- The baseline (37.42) is higher than the self-evolved result (31.23), indicating that under budget constraints, automatic search has not yet reliably surpassed the combination of “human-designed training + a mature framework,” and co-optimization still has clear room for improvement.
4. Putting Co-Optimization into Engineering Practice
4.1 Do Failure Attribution First, Then Decide Which Side to Change
It is advisable to build an error taxonomy on the visible set: wrong tool selection, wrong parameter filling, missing context, missing flow branches, and insufficient knowledge. The first four categories should be addressed by changing the framework first; only the last one calls for changing the weights.
4.2 High-Value Framework Improvements
- Layered context: store system instructions, task state, and tool results in separate zones to avoid cross-contamination;
- Structured tool returns: unify error codes and fields to reduce parsing ambiguity;
- Checkpoints and fallback: add intermediate validation to long flows so that failures can be retried locally instead of restarting the whole run;
- Plan–execute–review in three stages: decouple “thinking” from “doing” to reduce the pressure of a single decision.
Illustrative pseudocode:
plan = planner(context)for step in plan:result = call_tool(step, schema=STRICT)if not validate(result):result = repair_or_fallback(step)context = summarize(context, result)answer = verifier(context, answer)
4.3 Low-Risk Weight Updates
Prefer parameter-efficient fine-tuning, with data focused mainly on “corrected failure traces,” and keep a regression set to prevent capability degradation; the teacher model call budget should be spent on labeling and distilling high-value samples rather than covering everything.
4.4 Iteration Rhythm for the Two Channels
A recommended rhythm is “framework first, weights following”: first use framework changes to get quick wins, then solidify the stabilized flow into a training data distribution, and finally use weight updates to lock in the behavior, forming a closed loop.
5. Common Pitfalls and Engineering Recommendations
- Pitfall 1: treating the evaluation score as absolute capability. It should be interpreted together with the breakdown and the baseline.
- Pitfall 2: submitting only weights without the framework. A paired submission is the complete deliverable.
- Pitfall 3: ignoring budget constraints. In real scenarios, compute and call budgets are hard boundaries.
- Recommendation: establish an independent internal validation set and regression mechanism; put framework configuration under version control; keep a rollback snapshot for each evolution step.
6. Conclusion
The core conclusion about agent self-evolution is a single sentence: weights and the runtime framework must be co-optimized. Through budget constraints, data tiering, and paired submission, the evaluation turns this proposition into a reproducible, comparable engineering problem. For development teams, the actionable path is: do failure attribution first, then use framework changes for short-term gains, use weight updates to lock in long-term behavior, and keep regressing on an independent validation set.
