How to Evaluate Open-Source LLMs for Multi-Agent Systems: Test First, Deploy Later
As open-source model selection shifts from benchmark scores to real engineering performance, this article explains how to evaluate open-source LLMs for agent applications. It covers three test dimensions (engineering-level code ability, long-horizon task reliability, and multi-agent collaboration at realistic scale), the four core components of a scalable multi-agent system with sample orchestration code, a structured debate experiment to stress-test collaboration, and a pre-deployment evaluation checklist covering success rate, P95 latency, per-task cost, concurrency limits, licensing, and safety controls. The goal: base model selection on your own measured data, not vendor claims.
1. The Criteria for Selecting Open-Source Models Are Changing
Evaluating open-source models used to be mostly about leaderboard scores. Today, teams care more about whether a model can complete real engineering tasks: reading long documents, modifying multiple code files, executing dozens of steps in sequence, and recovering on its own after errors. Vendors’ release announcements increasingly highlight these scenarios.
For agent applications, the cost and controllability of the underlying model matter just as much. Open-source models can be deployed privately so that data never leaves your environment, and per-call costs can be lower. But these advantages only matter if task performance meets requirements. Model selection should therefore be driven by your own tasks, with public benchmarks serving only as an initial filter.
2. How to Test Three Key Capabilities
Code Ability: Can It Make Engineering-Level Changes?
Code evaluation should go beyond single-function completion. More informative tests include multi-file edits, dependency analysis, and cross-module refactoring. Focus on two things during testing. First, within a long context, can the model accurately locate the relevant code and stay consistent? Second, in the loop of “write code, run it, read the error, fix it,” can the model converge to a correct result within a few iterations? Record the number of fix iterations per task as a stability metric.
Long-Horizon Task Execution: Reliability Decides Usability
Short Q&A and long-horizon tasks place very different demands on a model. Long tasks test three things: whether instructions are still followed after many turns, whether the overall goal is retained as the context grows, and whether execution can resume from a reasonable point after an exception.
A common pattern is to set checkpoints and store task state outside the model’s context, such as in a database or object storage. After each step, the model writes progress to the external state. Even if the context is lost or the process is interrupted, the system can resume from the latest checkpoint instead of starting over.
Multi-Agent Collaboration: Take Scale Claims with a Grain of Salt
Some vendors claim their versions support hundreds of parallel sub-agents and thousands of collaborative steps. These numbers describe the system’s design ceiling, but a typical team may not be able to reproduce them reliably in daily workloads. As concurrency rises, so do scheduling overhead, token consumption, task conflicts, and failure rates. Measure these figures under your own load and trust the measured results.
3. The Basic Components of a Multi-Agent System
A scalable multi-agent system usually consists of four components:
- Scheduler: decomposes tasks, assigns them to sub-agents, and manages their lifecycle;
- Communication bus: typically a message queue for asynchronous decoupling, avoiding direct calls between sub-agents;
- Shared memory layer: stores intermediate artifacts in object storage or a vector database, with versioning;
- Result aggregator: deduplicates, validates, and merges parallel outputs.
The sample code below shows the basic structure for scheduling, timeouts, retries, and concurrency limits. You need to plug in your own planner, run_agent, aggregator, and logging implementations to run it:
import asyncioMAX_AGENTS = 50 # Concurrency cap; tune based on measured resultsTASK_TIMEOUT = 600 # Timeout per subtask (seconds)MAX_RETRY = 2 # Max retries after failureasync def run_with_retry(subtask):for attempt in range(MAX_RETRY + 1):try:return await asyncio.wait_for(run_agent(subtask), timeout=TASK_TIMEOUT)except asyncio.TimeoutError:log_error(subtask.id, attempt, "timeout")except Exception as exc:log_error(subtask.id, attempt, exc)return None # Record the failure; the aggregator decides whether it affects the final resultasync def orchestrate(task):subtasks = planner.decompose(task, max_agents=MAX_AGENTS)sem = asyncio.Semaphore(MAX_AGENTS) # Limit the number of concurrently running sub-agentsasync def bounded(st):async with sem:return await run_with_retry(st)results = await asyncio.gather(*(bounded(st) for st in subtasks))valid = [r for r in results if r is not None]return aggregator.merge(dedup(valid))
Two points in this code require special handling. First, retries may cause the same subtask to run twice, so each subtask needs a unique ID; check whether that ID has already completed before writing to shared storage to keep operations idempotent. Second, model API calls may hit rate limits, so run_agent should include backoff waiting to avoid large numbers of simultaneous request failures.
4. Testing Multi-Agent Collaboration with a Debate Experiment
Instead of relying only on benchmark scores, you can design a structured simulation experiment. Have multiple agents play decision-makers with different positions, run several rounds of debate on the same topic, and let the aggregator produce a final conclusion.
Design the experiment like this:
- Define 3 to 5 roles, each with an explicit position, goal, and constraints;
- Run 3 to 5 speaking rounds, where each role may only reference content from earlier rounds;
- Score with a rubric covering position consistency, role fidelity across long dialogues, and argument validity;
- Have the aggregator produce a convergent conclusion when opinions conflict, and record whether convergence was reached and in how many rounds.
After each run, log the inputs, outputs, scores, and elapsed time in an experiment record. Repeat the same setup multiple times and observe the variance in results. This kind of experiment exposes problems that traditional benchmarks miss, such as role drift and aggregation bias.
5. A Pre-Selection Evaluation Checklist
Evaluate with real business data and record the following metrics:
- Task set: extract at least 100 tasks from real business scenarios, covering normal, boundary, and exceptional cases;
- Success rate: judge completion per task, distinguishing fully correct from partially correct;
- P95 latency: record the 95th-percentile response time, not just the average;
- Per-task cost: track token consumption and cost per task, including failed retries;
- Concurrency limit: measure the concurrency level at which success rate starts to drop noticeably;
- Security and compliance: confirm the model license permits commercial use and private deployment, clarify whether data is used for retraining, and verify the sensitive-data masking process.
Beyond the model itself, engineering-level safety controls are also needed:
- Minimal tool permissions: agents can only call the APIs required for their tasks, and write operations need human confirmation;
- Audit logs: record the input, output, and initiator of every tool call;
- Staged rollout and rollback: route a small share of traffic to the new model first, and keep a switch to revert to the previous setup;
- Human review: results involving funds, permissions, or external messaging must go through manual review.
For deployment, you can build the evaluation environment using general-purpose container platforms, object storage, and monitoring/alerting. This reduces infrastructure investment and makes it easier to compare different models under the same environment.
6. Conclusion
Engineering agent capabilities is becoming a key competitive front for models. For teams, building your own evaluation set is more valuable than chasing leaderboard scores: record real success rates, latency, and costs, and document the failure modes of your collaboration architecture as institutional knowledge. Model selection decisions should come from that data, not from marketing numbers.
