Evaluation · Advanced
When Agents Negotiate With Agents: Designing a Control Test

How can a company test whether it is losing money because its negotiation agent is weaker than the agent on the other side? Treat the problem as a paired experiment: hold the deal constant, vary the negotiator, log every material action, and measure the cost of getting to agreement.
When two automated systems negotiate, a poor outcome can have several causes. Your agent may be strategically weak. The other agent may be unusually aggressive. The market may have changed. The deal population may be different. Or the nominal price may look acceptable while hidden delays, retries, escalations, and concessions consume the margin.
The practical question is therefore not “Did our agent get a good price?” It is:
Compared with a credible alternative under the same conditions, did this agent produce more value after all negotiation and operating costs?
This article describes a control test for answering that question. It is a test design, not a report of measured results. No customer facts, prices, credentials, or external study results are assumed.
The test in one sentence
Construct matched negotiation cases, assign the current agent and a control agent to comparable cases, expose both to the same counterpart population and policy constraints, and compare risk-adjusted net contribution after including transaction costs.
The design has four required elements:
- A control group representing the credible alternative.
- A paired or blocked allocation method that prevents easy cases from clustering in one arm.
- A complete negotiation log covering offers, messages, tool calls, timing, and termination.
- A value model that includes price, probability of completion, service cost, human intervention, delay, and failure.
If any of these is missing, the result may still be useful as an operational dashboard, but it is not strong evidence that one agent is weaker than another.
What “weaker” means operationally
“Weaker” should not mean that an agent sounds less persuasive or gives up more often. Define weakness as an observable loss against a predeclared objective.
For a purchasing agent, a simple objective might be:
net_contribution =
expected_product_value
- agreed_price
- fulfillment_cost
- negotiation_compute_cost
- human_review_cost
- delay_cost
- failure_cost
For a sales agent, the sign of the price term changes, but the structure remains: value received minus the costs and risks required to obtain it.
Possible primary metrics include:
- Net contribution per eligible case: the recommended primary business metric.
- Agreement rate: useful only when non-agreement has a defined value.
- Effective price: the agreed price adjusted for concessions, fees, and expected failure.
- Time to agreement: elapsed time from the first valid offer to an accepted agreement.
- Intervention rate: the share of cases requiring a human or supervisory process.
- Policy-violation rate: cases in which the agent crosses a hard constraint or requires an emergency stop.
Choose one primary metric before looking at outcomes. Keep the others as secondary diagnostics. Otherwise, the team can unintentionally select whichever metric makes the preferred agent look strongest.
A concrete case: procurement agents
Consider a company that uses an agent to negotiate recurring purchases. The company suspects that a supplier-side agent is extracting more value than its own system. It has observed several deals with higher-than-expected prices, but those deals also involved urgent delivery and unusual specifications.
The company creates a test set in which each case contains:
- An item or service specification.
- A target quantity and delivery window.
- A reservation price or maximum acceptable total cost.
- Known switching, delay, and fulfillment assumptions.
- A counterpart endpoint or scripted counterpart behavior.
- A case identifier with no personal data or production credentials.
Each case is then negotiated twice, or matched with a near-identical case negotiated by the other agent. The current production agent is the treatment arm. The candidate replacement, a frozen previous version, a deterministic policy, or a human-authored benchmark can serve as the control arm. The choice depends on the question being asked:
| Question | Control choice | Interpretation |
|---|---|---|
| Is the new agent better than the old one? | Frozen previous version | Change relative to the shipped baseline |
| Is automation better than the current process? | Existing human or rule-based process | Change relative to current operations |
| Is the agent losing to this counterpart? | Same agent against a neutral benchmark counterpart | Separates counterpart effect from policy weakness |
| Which strategy performs best? | Predefined alternative strategy | Direct strategy comparison |
A single observed loss to a supplier does not identify the cause. A paired design makes the comparison more informative by holding the case and counterpart conditions as constant as practical.
Separate three effects before interpreting the result
In agent-to-agent negotiation, the observed outcome is a mixture of at least three effects:
- Case effect: the item, urgency, constraints, and reservation value.
- Counterpart effect: the other agent’s policy, information, patience, and termination rules.
- Our-agent effect: the strategy, model, tools, memory, and escalation policy being evaluated.
The test should identify the third effect without pretending that the first two do not exist.
A useful design is a crossed matrix:
| Counterpart A | Counterpart B | |
|---|---|---|
| Agent under test | U-A | U-B |
| Control agent | C-A | C-B |
Run the cells on matched cases where possible. The comparison between U-A and C-A estimates the agent difference under counterpart A. The comparison between U-B and C-B estimates it under counterpart B. If the gap changes sharply between counterparts, the agent may be brittle rather than universally weak.
Do not infer that the stronger agent against Counterpart A will be stronger against every real counterpart. Generalization requires a counterpart sample that reflects the environments in which the agent will operate.
Step 1: Write the protocol before running cases
Put the test protocol in a versioned file. A minimal YAML configuration might look like this:
test_id: procurement-negotiation-v1
objective:
primary_metric: net_contribution_per_eligible_case
direction: maximize
unit: currency_units
arms:
treatment:
id: agent-current
version: 2026-11-28
control:
id: agent-frozen-baseline
version: 2026-10-15
allocation:
design: blocked-paired
block_keys:
- product_family
- urgency_band
- quantity_band
- counterpart_id
assignment_seed: "replace-with-recorded-seed"
constraints:
max_rounds: 12
max_elapsed_seconds: 900
human_escalation: allowed
hard_stop_on_policy_violation: true
logging:
schema_version: 1
store_prompts: false
store_model_outputs: true
redact_personal_data: true
analysis:
primary_comparison: treatment_minus_control
exclude_cases_only_for_predeclared_reasons: true
The values above are illustrative placeholders, not recommended production settings. The important properties are versioning, explicit metric direction, fixed arm definitions, recorded allocation, declared limits, and a rule for exclusions.
Freeze the protocol before inspecting treatment-versus-control results. If a limit must change for safety or operational reasons, create a new protocol version and preserve the original run.
Step 2: Build eligible cases
Define the population to which the result is meant to apply. The eligibility rule should state which cases enter the test and which do not.
For each case, record variables that could affect negotiation:
{
"case_id": "case-000127",
"product_family": "example-family",
"quantity_band": "medium",
"urgency_band": "standard",
"specification_complexity": "low",
"counterpart_id": "counterpart-03",
"reservation_value": "stored-separately",
"allowed_channels": ["api"],
"eligible": true
}
The field names are examples. Do not place secrets, access tokens, private customer details, or unredacted personal data in the test corpus. If a production case is necessary, substitute stable pseudonymous identifiers and isolate sensitive values from the article, test logs, and analysis exports.
Avoid constructing cases only from deals that already went badly. That creates a diagnostic sample, not an estimate of performance across the eligible population. If the purpose is specifically to investigate failures, label the run as a failure-focused study and avoid presenting it as a general performance estimate.
Step 3: Use paired or blocked assignment
A paired design compares agents on the same case or on cases matched by important variables. This reduces noise from case difficulty. When exact replay is unsafe or impossible, use blocking: group cases by predeclared characteristics and allocate both arms within each block.
For a deterministic assignment script, the important requirement is reproducibility, not a particular programming language. For example:
python assign_cases.py \
--cases eligible_cases.jsonl \
--arms agent-current agent-frozen-baseline \
--block-by product_family urgency_band quantity_band counterpart_id \
--seed recorded-seed \
--out allocation-v1.jsonl
The command is a template. It assumes a local script with those arguments; this article does not claim that such a script exists in your environment.
The allocation output should contain at least:
{
"case_id": "case-000127",
"block_id": "family-a|standard|medium|counterpart-03",
"pair_id": "pair-000064",
"arm": "treatment",
"allocation_seed": "recorded-seed",
"protocol_version": "procurement-negotiation-v1"
}
Do not reassign a case after seeing its outcome. If a run is interrupted, resume from the recorded allocation rather than reallocating unfinished cases.
Step 4: Freeze the negotiation environment
Agent comparisons are invalid if one arm receives materially different information or tools. Record and, where practical, hold constant:
- System and developer instructions.
- Model identifier and relevant inference parameters.
- Tool definitions, tool versions, and tool permissions.
- Available case facts and counterpart messages.
- Maximum rounds, timeout rules, and retry behavior.
- Escalation criteria and human response service level.
- Currency, tax, fee, delivery, and settlement assumptions.
If the purpose of the experiment is to compare complete systems, changing tools may be part of the treatment. In that case, document the systems as bundles. Do not later describe the result as a pure model comparison.
For live counterparties, use a safe test mode, sandbox, capped exposure, or an approved shadow process. A control test should not create unauthorized commitments. The exact safety mechanism depends on the business process and is outside the evidence available here.
Step 5: Log the full negotiation, not only the final price
The final agreement is an endpoint, not an explanation. A usable log should allow another analyst to reconstruct what happened without exposing secrets or personal data.
A compact event schema might be:
{
"test_id": "procurement-negotiation-v1",
"run_id": "run-2026-11-28-001",
"case_id": "case-000127",
"pair_id": "pair-000064",
"arm": "treatment",
"event_index": 4,
"timestamp": "2026-11-28T10:15:12Z",
"event_type": "offer_sent",
"actor": "our_agent",
"offer": {
"price": "redacted-or-tokenized",
"quantity": "redacted-or-tokenized",
"delivery_window": "standard"
},
"message_hash": "optional-content-hash",
"tool_calls": [],
"latency_ms": 842,
"policy_checks": {
"within_reservation_value": true,
"within_round_limit": true
},
"termination": null,
"schema_version": 1
}
Useful event types include:
case_loadedmessage_receivedoffer_sentcounteroffer_receivedtool_calledtool_failedhuman_escalation_requestedhuman_escalation_resolvedagreement_reachednegotiation_abandonedhard_stop
Use append-only storage or an equivalent audit mechanism. If messages cannot be retained because of privacy or security requirements, retain structured features, hashes, timestamps, and policy decisions sufficient to reproduce the analysis. State exactly what was omitted.
Step 6: Measure transaction costs
A price-only comparison can favor an agent that consumes more time, more tokens, more retries, or more human attention. Define transaction cost before the run.
One useful decomposition is:
transaction_cost =
compute_cost
+ communication_cost
+ human_review_cost
+ retry_and_recovery_cost
+ delay_cost
+ expected_failure_cost
The terms do not need to be expressed in the same physical unit initially. Convert them to a common analysis unit only after defining the conversion rule.
Examples of observable inputs:
| Cost component | Possible measurement | Common mistake |
|---|---|---|
| Compute | Input and output usage, tool runtime, infrastructure records | Counting only successful requests |
| Communication | Messages, API calls, channel fees, counterpart requests | Ignoring repeated or duplicate messages |
| Human review | Intervention count and elapsed handling time | Assigning zero cost to “occasional” intervention |
| Delay | Elapsed time mapped to a predeclared business cost | Applying a post-hoc penalty only to the weaker arm |
| Failure | Expected loss from invalid, abandoned, or failed agreements | Removing failures from the denominator |
If you do not know a cost precisely, use a range or sensitivity analysis. Do not silently set an unknown cost to zero and then describe the result as total economic performance.
Step 7: Define outcomes and exclusions
Create an outcome record for every eligible case, including cases with errors or no agreement:
{
"case_id": "case-000127",
"arm": "treatment",
"status": "agreement_reached",
"agreed_terms_valid": true,
"gross_value": 0,
"transaction_cost": 0,
"net_contribution": 0,
"rounds": 0,
"elapsed_seconds": 0,
"human_interventions": 0,
"policy_violations": 0,
"failure_reason": null
}
The zero values above are placeholders showing the shape of the record. They are not results.
Predeclare rules for:
- Counterpart downtime.
- Malformed test cases.
- Infrastructure outages that affect both arms.
- Infrastructure failures that affect only one arm.
- Policy violations.
- Human intervention.
- Partial agreements.
- Timeouts and abandoned negotiations.
Usually, a policy violation is an outcome to report, not a reason to remove the case. If a case is excluded, preserve it in the run data and include the exclusion count and reason in the analysis.
Step 8: Compare paired differences
For each pair, calculate the treatment-minus-control difference in the primary metric:
difference_i =
net_contribution_treatment_i
- net_contribution_control_i
Summarize the distribution of differences, not only the average. Report at least:
- Number of eligible pairs.
- Number of completed pairs.
- Mean and median paired difference.
- Spread, such as standard deviation or interquartile range.
- Agreement and failure rates by arm.
- Transaction cost by arm.
- Differences by predeclared block.
- Missing, excluded, and interrupted cases.
A simple analysis command could be:
python analyze_pairs.py \
--outcomes outcomes-v1.jsonl \
--allocation allocation-v1.jsonl \
--metric net_contribution \
--paired-by pair_id \
--report report-v1.json
Again, this is an illustrative interface. It is not evidence that a particular tool or script is available.
For uncertainty, use a method appropriate to the data and state it explicitly. A confidence interval around the mean paired difference can communicate estimation uncertainty. If the data are heavy-tailed or contain a small number of large losses, bootstrap intervals or robust summaries may be more informative than a normal approximation.
A p-value is not a substitute for an economic decision. A small difference can be statistically detectable and commercially irrelevant. A large estimated difference can be important even when the sample is too small for a precise conclusion. Report the estimate, uncertainty, practical threshold, and decision rule together.
Set a decision threshold before looking at outcomes
Define what result would justify action. For example:
ship_candidate_if:
lower_bound_of_net_contribution_gain > minimum_economic_gain
and policy_violation_rate <= maximum_allowed_rate
and human_intervention_rate <= maximum_allowed_rate
The threshold values are intentionally unspecified because they depend on the company’s economics, risk tolerance, and governance requirements.
Use a practical threshold rather than “any positive improvement.” A candidate that improves price by a small amount but doubles manual review may not be better. Conversely, a candidate that produces similar average contribution but materially reduces severe losses may be preferable if downside risk matters.
Verification checklist
Before accepting the result, verify the following:
- The protocol, agent versions, tools, prompts, and policy limits are recorded.
- The control is a credible alternative for the question being asked.
- Allocation was performed before outcome inspection and can be reproduced from the recorded seed.
- Both arms received equivalent case information and counterpart conditions, or deviations are documented.
- Every eligible case has an outcome or an explicit interruption reason.
- The primary metric was chosen before comparing results.
- Transaction costs and failures are included in the denominator and economic model.
- Exclusions are visible and not silently removed.
- Policy violations and unsafe behavior are reported separately from financial performance.
- The final report distinguishes observed facts, assumptions, estimates, and unresolved limitations.
These checks validate the integrity of the test record. They do not prove that the result will generalize to every future counterpart or market condition.
Failure cases that commonly invalidate the comparison
Only comparing successful deals
Excluding abandoned negotiations can make an agent with a high failure rate look efficient. Keep failures in the outcome table and assign them the predeclared business consequence.
Changing the counterpart between arms
If the treatment agent negotiates with a tough counterpart and the control agent negotiates with an easy one, the observed gap is not attributable to the agent alone. Use matched counterpart conditions or include counterpart as a blocking and analysis variable.
Letting one arm escalate more easily
Human escalation is part of the system. If one agent can call for help after two rounds while the other must continue for ten, compare complete operating policies or make the escalation rule equivalent.
Replaying messages unrealistically
Exact replay can create an artificial environment if the counterpart would react differently to a different timing or offer. For live tests, document whether the counterpart is scripted, sandboxed, simulated, or independent. Interpret each design according to that environment.
Optimizing after inspecting the test
Changing the agent, case filters, or metric after seeing results turns one test into a sequence of partially observed experiments. Version the next protocol and label it as a new run.
Using a weak control
A deliberately poor control can make the treatment look successful without answering the business question. The control should represent a real alternative: the current production system, the previous version, an approved policy, or a meaningful benchmark.
Ignoring correlated failures
If a counterpart outage affects every case in a block, the cases are not independent observations. Preserve the event and consider block-level analysis rather than treating every failed case as unrelated evidence.
Limitations
A paired control test can show that one complete negotiation system performed differently from another under defined conditions. It cannot, by itself, establish which internal component caused the difference. Model choice, prompt, memory, tools, retry logic, human review, and counterpart handling may all contribute.
It also cannot guarantee future performance. Counterpart policies may adapt. Deal mix may drift. Prices and service conditions may change. A test that is safe in a sandbox may not capture the strategic effects of live interaction.
For these reasons, treat the test as part of a sequence:
- Offline replay or simulation for inexpensive debugging.
- Paired or blocked controlled tests for causal comparison under defined conditions.
- Limited exposure with hard limits and monitoring.
- Ongoing measurement for drift, counterpart adaptation, and transaction costs.
The evidence becomes stronger when the same result survives across new case blocks, counterpart types, and time windows. That is an empirical requirement, not an assumption.
What a reproducible report should contain
A useful report lets a reviewer answer five questions:
- What exact systems were compared?
- Which cases and counterpart conditions were eligible?
- How were cases assigned?
- How were value, failure, and transaction cost calculated?
- What uncertainty and limitations remain?
A compact report structure is:
1. Decision question
2. Primary metric and decision threshold
3. Protocol and version identifiers
4. Treatment and control definitions
5. Case population and allocation method
6. Counterpart coverage
7. Logging and redaction rules
8. Outcome and transaction-cost definitions
9. Results by arm and paired differences
10. Failures, exclusions, and interruptions
11. Safety and policy-violation results
12. Uncertainty and limitations
13. Decision and next protocol version
Do not include secrets, personal data, production credentials, or copied customer messages in the report. A reproducible test requires reproducible structure and assumptions, not unrestricted publication of raw data.
Bottom line
If a company wants to know whether its negotiation agent is weaker than the agent on the other side, it should stop treating individual deals as proof. Use matched cases, a credible control, controlled counterpart exposure, complete negotiation logging, and a net-value metric that includes transaction cost.
The decisive comparison is not simply “which agent named the lower price.” It is which complete system produces more reliable net contribution under the same declared conditions, with fewer costly interventions and failures, while staying inside its policy limits.
For related implementation patterns, see the guides and the glossary.