Deal Memo · v0.1 · two-party autonomous negotiation

Two agents sit down,
open the documents,
and work out the deal.

PairMind runs a Buyer and a Seller as separate agents. They negotiate unit price, delivery, payment terms and warranty across multiple turns — each move grounded in citations from their own private documents — until they reach agreement or walk away.

orchestrationLangGraphretrievalOpenSearch · BM25+kNN+RRFreasoningClaude HaikutransportSSE → React
§ 01The Ledger
unit_price · running ledger total
$/ unit · USD
  1. turn_01buyer →PROPOSE
    unit_price = $0 · net_60 · 24mo warranty

    Opening anchor below market median; budget ceiling at $520.

    citeRFP§ RFP-04
  2. turn_02← sellerCOUNTER
    unit_price = $500 · net_30 · 18mo warranty

    Floor is $508; opening above to leave room on payment terms.

    citePL§ PL-22
  3. turn_03buyer →COUNTER
    unit_price = $535 · net_45 · 24mo warranty

    Concede on payment window in exchange for price movement.

    citeRFP§ RFP-11
  4. turn_04← sellerCOUNTER
    unit_price = $510 · net_45 · 24mo warranty

    Warranty extension acceptable per service-cost model.

    citeQA§ QA-07
  5. turn_05buyer →COUNTER
    unit_price = $528 · net_45 · 24mo warranty

    Matches authorized ceiling; final movement before walk.

    citeRFP§ RFP-04
  6. turn_06← sellerCOUNTER
    unit_price = $520 · net_45 · 24mo warranty

    Within margin floor when amortized over 24-month volume.

    citePL§ PL-22
  7. turn_07buyer →ACCEPT
    AGREEMENT — $515 · net_45 · 24mo warranty

    All authorized terms satisfied. Closing the deal.

    citeRFP§ RFP-04
§ 02Protocol

One loop, five disciplined steps. No free-form chat.

  1. step_01

    Retrieve

    Hybrid search over each agent's private corpus — BM25 + kNN, fused with Reciprocal Rank. Tag filters keep buyer docs out of the seller's index, and vice versa.

    .retrieve()
  2. step_02

    Reason

    Claude Haiku is called with the retrieved passages and prior turn history. The model must emit a strict JSON envelope: msg_type, terms, rationale, citations.

    .reason()
  3. step_03

    Validate

    Every cited passage is checked against the retrieval set. One automatic retry on schema or citation failure — then the turn is rejected.

    .validate()
  4. step_04

    Decide

    The validated envelope routes the LangGraph state machine to PROPOSE, COUNTER, ACCEPT or WALK_AWAY. The other agent picks up the next turn.

    .decide()
  5. step_05

    Loop

    Repeat until acceptance, walk-away, deadlock detection (two identical offers in a row), or the turn limit is reached. Every transition streams to the UI over SSE.

    .loop()
§ 03Agent Isolation

Neither agent ever reads the other's brief.

The Buyer and Seller graphs share only the public turn log. System prompts, retrieval indexes, and authority limits are partitioned at the orchestration layer — not just by convention.

Buyer · Orion Manufacturingprivate · sealed
budget_ceiling
$520 / unit
min_warranty
24 months
payment_window
net_45 or longer
walk_conditions
delivery > 6 weeks
docs
RFP-04, RFP-11, SOW-09
Seller · Halden Componentsprivate · sealed
margin_floor
$508 / unit
max_warranty
30 months
preferred_terms
net_30
lead_time
4 weeks at current volume
docs
PL-22, QA-07, MFG-13
§ 04Termination

A session ends in exactly one of four states.

AGREEMENT

Both agents emit ACCEPT on identical terms. The deal envelope is sealed and returned.

WALK_AWAY

One side determines no in-policy move exists. Reasons are logged with citations.

DEADLOCK

Two consecutive identical offers detected. The loop halts before burning the turn budget.

TIMEOUT

The turn_limit was reached without convergence. State is preserved for human review.

// stack
  • LangGraph·
  • OpenSearch·
  • Claude Haiku·
  • FastAPI·
  • React·
  • SSE