Definition
Agents allocate tasks and resources through bidding, pricing, or the Contract Net Protocol.
Category: Decision
When to use
Resource scheduling, tool-cost optimization, robotic task allocation, multi-agent load balancing.
When not to use
When bids can't be trustworthy estimates, tasks are tiny, or the negotiation cost outweighs execution.
How to implement
- The manager publishes a task announcement with goal, constraints, budget, and acceptance criteria.
- Agents return bids: cost, ETA, confidence, required permissions.
- The manager picks by a scoring function.
- Update agent reputation after completion — discourages chronic low-balling.
Minimal pseudocode
TypeScript
const bids = await Promise.all(agents.map(a => a.bid(task)));
const winner = rank(bids, b => b.confidence / Math.max(b.cost, 1))[0];
const result = await winner.agent.run(task);
reputation.update(winner.agent, result);
Recommended trace events
auction.announcedauction.bid.receivedauction.awardedauction.completed
Common failure modes
- Agents underestimate cost.
- The scoring function gets gamed instead of solving the real task.
- Negotiation tokens dominate the budget.
Implementation checklist
- Input/output schemas defined.
- Each agent's permission boundary defined.
- Every agent call carries a run id / trace id.
- Failure, timeout, cancel, and retry strategies defined.
- Context passed is the minimum required, not the full history.
- High-risk actions are gated by approval or a verifier.