Evaluating and Implementing Natively Multimodal Programming Agents
This article explores the evaluation and practical implementation of natively multimodal programming agents. It emphasizes shifting focus from single-turn answer quality to overall delivery quality, covering critical aspects such as underlying architectures (sparse experts, long context, multimodality), long-horizon programming stability, code-driven UI design, multi-agent collaboration, and secure background autonomous operation. By establishing objective evaluation metrics and a phased implementation approach, organizations can effectively integrate AI agents into real-world software engineering workflows.
1. Evaluating Programming Agents: From “Answer Quality” to “Delivery Quality”
Traditional code generation systems typically revolve around a single interaction: the user describes a requirement, and the system outputs a function, script, or modification suggestion. For well-defined, small-scale tasks, this approach reduces repetitive labor. However, in real-world software engineering, requirements are often scattered across documentation, page screenshots, existing code, test cases, and runtime logs. A single generation cycle is rarely sufficient to complete the entire job.
The goal of a programming agent is to combine model reasoning capabilities with tool execution capabilities to form a closed loop: “understand requirements — formulate a plan — execute operations — verify results — correct the scheme.” It must not only generate code but also determine the scope of modifications, handle dependencies, understand failure information, and request human confirmation when necessary.
Therefore, when discussing the user experience, we cannot merely look at whether the answer is fluent or the code appears reasonable. We should focus on the following questions:
- Can it clarify ambiguities in requirements rather than arbitrarily filling in unverified business rules?
- Can it complete cross-file modifications while maintaining consistency with existing interfaces and behaviors?
- Can it prove the delivery is valid through tests, builds, and runtime results?
- Can it stop safely when permissions are insufficient, tools fail, or the budget is exhausted?
- Can it explain what was modified, what was verified, and what issues remain unresolved?
These questions correspond to engineering usability, not just demo effects. Native multimodality, long context, and multi-agent collaboration only hold practical value if they improve these outcomes.
2. Understanding the Underlying Architecture: Parameter Scale is Not a Sufficient Condition
2.1 What Sparse Expert Architecture Solves
Sparse expert architecture allocates a portion of model computation to multiple expert networks, and a routing mechanism selects the experts to participate in computation for a given input. It allows a model with a large total parameter scale to activate only a subset of parameters for computation during inference.
Two concepts must be distinguished here: total parameters affect the storage and deployment requirements of model weights, while active parameters relate to the computational load of a single inference. The two are not interchangeable, nor can they be directly used to estimate actual response speed.
Actual inference cost is also influenced by context length, output length, concurrency, communication overhead, caching strategies, and hardware utilization. Therefore, you cannot assume low deployment costs simply because of “fewer active parameters,” nor can you assume stronger coding capabilities simply because of “larger total parameters.”
For enterprise deployment, the priority for evaluation should be the time-to-first-token, full task completion time, throughput stability, and resource usage under target workloads, rather than comparing parameter numbers in isolation.
2.2 Long Context Expands Information Capacity, But Does Not Guarantee Effective Understanding
Long context can accommodate more code, documentation, and historical records, reducing the cost of developers repeatedly supplying background information. However, “fitting the input” does not equate to “understanding it accurately.”
Large code repositories contain a vast amount of information irrelevant to the current task. Directly sending all content into the context can increase noise, cost, and localization difficulty. A more reasonable approach is to establish a layered information structure:
- First, provide task goals, acceptance criteria, and constraints;
- Then, locate relevant modules, entry functions, and dependencies;
- Next, supplement key code, tests, and error logs;
- Finally, retain phase conclusions and unresolved issues.
In long-horizon tasks, structured state should be continuously maintained rather than allowing all historical conversations to accumulate indefinitely. Task summaries also need to retain evidence sources to avoid losing key constraints during the compression process.
2.3 Native Multimodality Still Requires Engineered Input Processing
Image and video inputs can be used to understand page layouts, operational processes, chart information, and failure scenes, but the model’s understanding of visual information is not inherently reliable.
For example, a screenshot might show a button’s position but cannot explain the state change after clicking it; an operation recording might contain multiple steps but may not show permission conditions and backend data. Therefore, multimodal input should be used in conjunction with text specifications, state descriptions, and acceptance criteria.
When dealing with critical business fields, amounts, permissions, and process nodes, the agent should be required to output recognition results for human verification. Video materials also need to specify key time fragments to prevent the system from missing briefly appearing but important information.
3. Long-Horizon Programming: Steady Progress Beats One-Shot Generation
3.1 Break Complex Requirements into Verifiable Phases
Long-horizon programming tasks usually include environment understanding, solution design, implementation, testing, integration, and delivery. Dependencies exist between phases, and errors in early steps will propagate to subsequent ones.
A reliable task workflow can be organized as:
Requirement clarification → Code localization → Plan confirmation → Small-step modification → Automatic verification → Integration check → Delivery explanation.
Among these, requirement clarification should specify “what not to do,” such as not modifying public interfaces, not migrating data structures, and not introducing new external dependencies. Plan confirmation needs to explain affected modules, compatibility risks, and rollback methods.
The value of small-step modifications lies in narrowing the failure blast radius. Executing corresponding verifications after completing each independent change makes it easier to locate issues than rewriting multiple modules at once.
3.2 Passing Tests Does Not Equal Requirement Completion
Automated testing is important evidence, but it only proves the behaviors that are covered. If an agent only fixes code around existing tests, it may miss uncovered edge cases or even produce “tests pass but business fails” results.
It is recommended to establish a layered acceptance mechanism:
- Static checks: Confirm syntax, types, and basic conventions;
- Unit verification: Check local logic and exception branches;
- Integration verification: Check data and call relationships between modules;
- Business acceptance: Confirm real usage scenarios and key constraints;
- Non-functional checks: Evaluate performance, security, maintainability, and resource usage.
For bug-fixing tasks, regression cases that reproduce the original problem should also be added. Deleting failing test cases, loosening assertions, or bypassing validations should not be considered valid fixes unless such changes are explicitly approved.
3.3 Set Boundaries for Failures
Agents may repeatedly attempt the same error or continuously expand the scope of modifications when lacking information. To prevent costs from spiraling out of control, maximum attempt limits, maximum runtime, tool call budgets, and modification scope constraints should be set.
Upon reaching a threshold, the system should output current progress, attempted schemes, failure evidence, and suggested human takeover points. Stopping safely is not a sign of incompetence, but a component of engineering system reliability.
4. Code-Driven UI Design: From Visual Restoration to Maintainable Implementation
Generating UIs through text or images can accelerate prototyping, but there is a clear gap between “looks right” and “ready for production.”
4.1 Convert Visual Requirements into Structural Constraints
Before generation, you should identify page regions, information hierarchies, component responsibilities, and state changes. For example, a data management page includes not just a table, but potentially loading states, empty states, filter conditions, pagination, error feedback, and permission differences.
If only colors, spacing, and animations are described, the system is prone to generating pages with complete appearances but missing behaviors. Therefore, the input should include both visual requirements and interaction rules, clarifying layout changes across different screen sizes.
4.2 Include Accessibility and Maintainability in Acceptance
UI quality cannot be determined solely by screenshots. You should also check keyboard operations, focus order, text contrast, form prompts, and dynamic feedback.
At the code level, focus on component boundaries, state management, duplicate logic, and style isolation. Implementations heavily stacked in a single file will increase future modification costs, even if they run successfully.
Three types of acceptance evidence can be adopted: visual comparison, interaction testing, and code review. These answer “Does it match the design?”, “Does it meet behavioral requirements?”, and “Is it easy to maintain long-term?” respectively.
5. Multi-Agent Collaboration: Parallelism Requires Dependency Management
5.1 Parallelizable vs. Non-Parallelizable Work
Multiple agents can handle documentation organization, module implementation, test additions, or independent reviews, but having more participants does not always mean faster task completion.
Tasks suitable for parallelization typically have clear inputs, independent outputs, and minimal shared state—for instance, separately checking the test coverage of different modules. Conversely, tasks involving shared core interfaces, frequent modifications to the same file, or strict sequential dependencies are better suited for serial progression or unified modification by a single owner.
The orchestration system should establish task dependencies first before deciding on concurrency levels, rather than increasing the number of agents first and then attempting to coordinate conflicts.
5.2 Establish Delivery Contracts for Subtasks
Subtasks should clearly define goals, input materials, modifiable scope, output format, and acceptance criteria. Otherwise, different agents may operate on different assumptions, generating results that cannot be integrated.
An illustrative task contract could be written as:
- Task goal: Add exception path tests for the specified module.
- Allowed scope: Only modify the test files for that module.
- Prohibited actions: Change business implementation, delete existing tests, access external networks.
- Deliverables: New test cases, execution results, explanation of uncovered scenarios.
- Acceptance criteria: Able to reproduce the target exception without affecting existing test cases.
Such constraints are more important than simply setting role names. Role descriptions define the intent of division of labor, while delivery contracts determine whether the results are usable.
5.3 Measure Collaboration ROI with Effective Completion Rate
Multi-agent systems introduce costs for coordination, redundant execution, context passing, and result integration. You should simultaneously record total time, resource consumption, conflict counts, and manual rework.
If parallel execution shortens generation time but significantly increases integration costs, the overall ROI may be negative. A better starting point is a small number of collaboration units with clearly defined responsibilities, scaling up gradually based on actual bottlenecks.
6. Background Autonomous Operation: Continuous Execution Must Be Paired with Governance
Letting agents continuously handle background tasks is suitable for log analysis, routine inspections, and data aggregation, but it cannot simply be equated with unattended operations.
6.1 Establish Tiered Permissions
It is recommended to divide permissions into four tiers: observe, suggest, restricted execution, and high-risk execution.
Reading monitoring data and generating analysis reports can use lower privileges; modifying configurations, restarting services, deleting data, or adjusting access policies require stricter approval and isolation.
Permissions should be granted temporarily per task, with limits on validity period, resource scope, and executable actions. An agent should not gain long-term, broad administrative privileges from a single task.
6.2 Distinguish External Content from Authorized Instructions
Code comments, web text, logs, and documentation may contain misleading instructions. The system must treat this content as data to be analyzed, not as trusted operational authorization.
Particularly after reading external materials, commands appearing within them should not be executed directly, nor should access privileges be expanded based on them. Tool execution should be jointly constrained by explicit policy rules and task authorization.
6.3 Retain Audit, Recovery, and Takeover Capabilities
Continuously running systems should log key decisions, tool calls, file changes, and approval results, and appropriately mask sensitive data.
Additionally, set state checkpoints, retry strategies, anomaly alerts, and human takeover entry points. For operations with side effects, consider whether repeated execution is safe; for irreversible operations, verify backup and recovery plans beforehand.
Long runtime does not prove reliability. What truly matters is whether the system can promptly detect anomalies, limit the impact, and restore to a controllable state after an exception occurs.
7. How to Establish Objective Evaluation Metrics
It is recommended to extract a representative set of tasks from real business scenarios rather than only selecting easy-to-demonstrate examples. The task set can cover defect fixing, cross-file refactoring, UI implementation, test additions, and operations analysis.
Each task should record the initial environment, input materials, permission scope, resource budget, and acceptance criteria, keeping conditions as consistent as possible. Due to potential fluctuations in model outputs, critical tasks need to be repeated.
Core metrics can include:
- Acceptance pass rate: Proportion of tasks meeting complete requirements;
- Human intervention: Effort required for clarification, correction, and takeover;
- End-to-end time: Total time including execution, verification, retry, and integration;
- Effective task cost: Resources consumed for qualified delivery;
- Security events and near-misses: Unauthorized attempts, dangerous operations, and interceptions;
- Maintenance quality: Change clarity, test sufficiency, and difficulty of subsequent modifications.
Public benchmark scores can serve as a reference, but different evaluation environments, tool permissions, and execution budgets affect results and cannot directly replace local business validation.
8. Implementation Advice: Establish a Closed Loop Before Expanding Autonomy
Developers can start with read-only analysis and code modification suggestions, then gradually open up restricted execution in isolated environments. Enterprises should prioritize low-risk, clearly verifiable, and highly repetitive tasks to establish evaluation baselines, permission policies, and audit processes.
For every expansion of autonomous execution scope, failure handling and rollback mechanisms should be synchronized. For cross-module modifications, production environment operations, and critical business decisions, explicit human approval nodes should be retained.
The value of natively multimodal programming agents is not to hand over all work to the model at once, but to connect requirement understanding, task execution, and result verification more tightly. The systems ultimately worth adopting should be able to deliver stably within clear boundaries and provide sufficient evidence to explain results, rather than just showcasing longer context, more collaboration units, or more complex capability descriptions.
