/pattern/contract-net/

03 · Multi-AgentTask BiddingAuction-based AgentsPrice-based Coordination

Contract Net.
Broadcast. Bid. Award. Execute.

Coordination occurs via bidding or price signals, where an agent broadcasts a task and others bid based on their capabilities, cost, or utility.

When to reach for it

  • Tasks must be distributed dynamically.
  • Agents possess varying capacities or costs.
  • Prioritization relies on utility signals.

When it backfires

  • Delegation is fixed.
  • Bidding creates more overhead than value.
  • Compliance dictates strict rule-based allocation.

The tradeoff

Scalable and flexible resource allocation is gained against the difficult design of incentive and auction structures.

The mental model

A shape you can draw on a napkin.

A manager broadcasts a task; bidders respond with offers; the winner gets the contract and executes.

ManagerBidder ABidder BBidder C
Pitfalls

Two ways this pattern will hurt you.

Bidders game the system with lowball bids

Agents bid unrealistically low to win contracts, then fail to deliver. The manager has no enforcement mechanism.

Fix · Track bidder history and reputation. Require a deposit or penalty clause for under-delivery.

Auction overhead exceeds task value

A simple task goes through a full bidding round. The coordination cost dominates the actual work.

Fix · Reserve contract-net for tasks where bidder heterogeneity genuinely matters. Use fixed routing for uniform work.

Framework support

Where Contract Net is native.

LangGraphimplementable via custom protocolsAdaptable
AutoGen / AG2implementable via custom protocolsAdaptable
AWS Strandsimplementable via custom protocolsAdaptable

Search

Search patterns, frameworks, and pages.