Multi-Agent Programming in Practice: Cost, Visual Checks, and Acceptance Criteria
As general-purpose LLMs shift from code completion to agentic execution, evaluation criteria must move beyond single-turn correctness toward real-world task completion. This article breaks down a practical framework for assessing multi-agent programming systems, covering cost modeling, parallel agent orchestration, screenshot-based visual verification, acceptance metrics, and risk governance.
When general-purpose large models evolve from “code completion” to “agentic execution,” the focus of technical evaluation shifts accordingly. Whether a single-turn question is answered correctly is no longer the key concern. What matters is whether an agent can understand a task in an isolated environment, modify code, run tests, inspect pages, and deliver an acceptable result. Recent generations of top-tier general-purpose models have shown notable changes in unit pricing, generation speed, and chart understanding capabilities, opening new cost headroom for parallel multi-agent execution—though overall expenses remain far from negligible. This article does not center on any specific product; instead, it abstracts these capability changes into general engineering problems and presents a reusable methodology for evaluating and deploying multi-agent programming systems.
1. The Shift in Evaluation: From “Can It Write Code” to “Can It Be Merged”
Traditional code generation benchmarks often focus on function-level correctness or unit test pass rates. Agentic programming, however, more closely resembles real development: the model must locate issues in an existing repository, understand dependencies, modify multiple files, add tests, and ensure existing behavior is not broken. Benchmarks designed for real-world collaboration typically emphasize whether a change set would be accepted by maintainers, which requires simultaneous assessment of runnability, test coverage, code style, dependency security, license compatibility, and maintainability. In other words, the model must not only write code that works in isolation but also produce changes that integrate cleanly into an existing codebase.
Parallel multi-agent execution further amplifies evaluation complexity. When multiple agents operate on different project directories concurrently, the system must address workspace isolation, budget control, timeout handling, log auditing, and result verification. Without these guardrails, parallelism introduces conflicts, redundant modifications, and cost drift rather than efficiency gains. A practical evaluation design should therefore separate “agent execution” from “engineering acceptance.” The former focuses on task decomposition, tool invocation, and iterative capability; the latter focuses on build success, test results, security, and visual consistency.
2. Cost and Speed: Rethinking the Budget Model for Multi-Agent Systems
Public information indicates that recent top-tier general-purpose models have seen roughly a 20% decrease in unit pricing and around a 30% improvement in generation speed. For a single API call, these changes are linear. But for parallel multi-agent execution, the impact is amplified. Total cost can be approximated as:
total_cost ≈ Σ(input_tokens × input_price + output_tokens × output_price + retry_cost + visual_check_cost)
Retry costs and visual checks are easy to underestimate. Agentic programming typically requires multiple rounds of “modify—run—read logs—modify again,” so output tokens dominate. Front-end tasks additionally require screenshot capture, diff comparison, and follow-up corrections. Lower unit prices free up budget headroom, and faster generation shortens feedback cycles—but as the number of parallel agents increases, total token consumption can still rise quickly. Evaluation must therefore enforce per-task budget caps, maximum iteration limits, and early-stopping conditions. For example, stop immediately when tests pass consecutively, the build succeeds, and visual differences fall below a threshold; force-terminate and preserve the workspace when budget is exhausted or multiple consecutive rounds show no progress.
Cost efficiency matters more than raw price. If a mid-tier reasoning setting can achieve results comparable to a top-tier baseline on real merge-oriented tasks at lower total cost, it is suitable for routine pipelines. Lower-tier settings work well for requirement clarification, simple refactoring, and test completion. Teams should configure models by task type rather than assigning the highest tier to every agent.
3. Visual Understanding: Closing the Screenshot Feedback Loop for Front-End Agents
One of the biggest differences between front-end and back-end tasks is that “does it look right” is difficult to assess from text alone. After an agent generates a page, it needs to inspect screenshots for layout overflow, spacing issues, insufficient contrast, and unreadable charts. In public evaluations, chart-understanding capabilities have improved by nearly 30 percentage points, indicating that models are moving from “can read an image” toward “can identify visual problems.”
However, building a reliable closed loop still requires engineering constraints: fix viewport size and device pixel ratio; establish baseline screenshots for key pages; use a combination of pixel diff and structural diff for judgment; include accessibility checks, console errors, and network failures in acceptance criteria; and apply stable waits and masking for dynamic content. Enhanced visual capability does not mean manual acceptance can be eliminated entirely. Rather, it shifts human reviewers from checking every page to reviewing high-risk diffs and design intent.
4. Practical Design for Parallel Multi-Agent Evaluation: Three Independent Directories, Minimal Intervention
A reusable evaluation approach is as follows: launch three sub-agents in the same integrated development environment, each responsible for an independent project directory, with task types covering page refactoring, interaction fixes, and test completion. No manual intervention occurs during execution; acceptance is performed uniformly after completion. The key design is:
tasks = [{id: "web-ui", dir: "/workspace/a", budget: B1, stop: ["build_ok", "tests_ok", "visual_diff_ok"]},{id: "interaction", dir: "/workspace/b", budget: B2, stop: ["tests_ok", "no_console_error"]},{id: "test-fix", dir: "/workspace/c", budget: B3, stop: ["coverage_up", "tests_ok"]}]for t in tasks:spawn_agent(task=t, isolation="container", max_rounds=N, log="audit")enforce_budget(t)on_stop(t): snapshot_workspace(t)
Each agent should run in a container or isolated workspace to prevent dependency pollution and file conflicts. All commands, logs, screenshots, and diff files should be archived for post-mortem review. Acceptance runs automated scripts first, followed by manual spot checks. This is not to say back-end projects require no testing at all—rather, current general-purpose models are already relatively stable at backend code generation, so evaluation can focus on interface contracts, data migration, vulnerable dependencies, and end-to-end integration. Teams with complex back-end systems should still maintain dedicated test suites.
5. Acceptance Metrics: Turning “Feels Fine” into Measurable Criteria
At minimum, the following dimensions should be covered: whether the build and startup succeed; whether unit and integration tests pass; whether static analysis and type checks introduce no new errors; whether dependencies contain known high-severity vulnerabilities; whether licenses are compatible; whether key page screenshot differences fall within threshold; whether console and network requests are free of errors; whether performance budgets show no significant regression; whether the code is readable and maintainable; and whether documentation and change descriptions are complete. For multi-agent results, additionally check for out-of-scope modifications, unrelated file changes, and duplicated dependencies.
6. Risk Governance and Implementation Recommendations
Primary risks in multi-agent programming include hallucinated modifications, dependency poisoning, license pollution, budget drift, parallel conflicts, and missing audit trails. Mitigations include task-card decomposition, pre-written acceptance scripts, budget guardrails, container isolation, snapshot rollback, and human review. Evaluation environments can be deployed on self-hosted infrastructure or on generic offerings such as Baidu AI Cloud’s container, object storage, and log services—using object storage to archive screenshots and artifacts, log services for auditing, and containers for isolated workspaces. It is worth emphasizing that improved model capability does not automatically translate into engineering readiness. Only by embedding evaluation metrics, budget controls, and rollback mechanisms into the workflow can multi-agent programming move from a demonstration use case to a stable, productive system.
