Skip to content

14. Directed Contracts

In the standard coordination model of Xchange, tasks are allocated through an open negotiation process. Managers announce tasks to the network, contractors evaluate those announcements, and interested agents submit bids. The manager then evaluates those bids and selects the most suitable contractor.

While this negotiation-based process is powerful and flexible, it is not always necessary. In many situations, managers already know which agent is best suited to perform a task. Requiring a full announcement and bidding cycle in such situations would introduce unnecessary communication overhead and delay execution.

To address these cases, Xchange supports a mechanism known as directed contracts. Directed contracts allow a manager to send a task directly to a specific contractor without broadcasting an announcement to the entire network. Instead of initiating open competition for the task, the manager proposes a contract to a selected agent and invites that agent to accept or reject the offer.

Directed contracts therefore represent a streamlined coordination pathway within the Xchange system. They preserve the contract-based structure of the protocol while eliminating the need for competitive bidding when the manager already has a suitable contractor in mind.

This section explores how directed contracts operate, when they should be used, how they interact with the rest of the protocol, and how they support efficient coordination within distributed agent systems.


Motivation for Directed Contracts

The task exchange model implemented by Xchange is designed to support flexible and decentralized coordination across large networks of agents. However, not all tasks require the same level of negotiation.

In practice, many distributed systems develop stable collaboration patterns over time. Agents that frequently work together may learn which partners are reliable, efficient, and well suited for particular types of tasks.

For example:

  • a data processing agent may consistently rely on a specific analytics agent
  • a workflow coordinator may frequently assign visualization tasks to the same rendering agent
  • a robotics control agent may regularly delegate navigation tasks to a specialized planning module

In these cases, the manager already possesses strong knowledge about which contractor should perform the task. Broadcasting a public announcement and waiting for bids would add latency without improving decision quality.

Directed contracts allow managers to leverage this knowledge by assigning tasks directly to trusted agents.


Reducing Coordination Overhead

One of the most significant advantages of directed contracts is their ability to reduce coordination overhead.

In large agent networks, broadcasting announcements can generate substantial communication traffic. Each announcement may be received by many agents, each of which must evaluate the task before deciding whether to submit a bid.

If the manager already knows which contractor should perform the task, this evaluation effort becomes unnecessary.

Directed contracts eliminate this overhead by sending the task directly to the intended contractor. Only one agent receives the request, and only one agent evaluates it.

This targeted communication approach reduces network traffic and allows tasks to move more quickly from creation to execution.


Situations Where Directed Contracts Are Useful

Directed contracts are particularly useful in several common scenarios.

Specialized Capabilities

Some tasks require specialized capabilities that only a small number of agents possess. In such cases, the manager may already know which agents are capable of performing the task.

Rather than broadcasting the announcement widely, the manager can contact one of these agents directly.

Repeated Collaboration

Agents that work together frequently may develop strong trust relationships. If a contractor has consistently delivered high-quality results in the past, the manager may prefer to assign tasks directly rather than reopening the negotiation process each time.

Time-Sensitive Tasks

In environments where tasks must be executed quickly, waiting for a bidding window to close may introduce unacceptable delays.

Directed contracts allow managers to assign tasks immediately, enabling rapid response to time-critical events.

Internal Subsystems

In hierarchical systems where groups of agents operate as coordinated subsystems, managers may use directed contracts to assign tasks within the group. This approach avoids unnecessary network-wide announcements while preserving the overall protocol structure.


Directed Contract Workflow

The workflow for directed contracts is simpler than the full bidding cycle but still follows a structured sequence.

The basic interaction sequence involves the following steps:

  1. Task creation by the manager
  2. Directed contract offer sent to the contractor
  3. Contractor evaluation of the offer
  4. Acceptance or rejection of the contract
  5. Execution of the task if accepted

This sequence preserves the key property of explicit agreement between manager and contractor.


Directed Contract Offer

The first step in the directed contract process is the contract offer message.

The manager sends a message to the selected contractor proposing that the contractor perform the task. This message contains the same essential information that would appear in a standard contract award message.

Typical components of the offer include:

  • task identifier
  • task description and parameters
  • required inputs or datasets
  • deadlines and milestones
  • reporting requirements
  • compensation or incentives if applicable

By including these elements, the offer provides the contractor with the information needed to evaluate the request.


Contractor Evaluation

Even though the manager selected the contractor deliberately, the contractor must still evaluate the offer before accepting it.

Contractor evaluation typically involves several checks.

Capability Verification

The contractor verifies that it possesses the necessary capabilities to perform the task.

Resource Availability

The contractor checks whether it has sufficient computational resources available. If the agent is already executing multiple tasks, it may not have capacity to accept another.

Scheduling Considerations

The contractor evaluates whether the task can be completed within the required deadline given its current workload.

Strategic Priorities

The contractor may also consider whether the task aligns with its strategic objectives or operational policies.

After performing these checks, the contractor decides whether to accept or reject the contract.


Contract Acceptance

If the contractor determines that the task is feasible and beneficial, it sends a contract acceptance message to the manager.

This message confirms that the contractor agrees to execute the task according to the specified parameters.

The acceptance message typically includes:

  • confirmation of task acceptance
  • acknowledgement of execution constraints
  • confirmation of reporting requirements

Once this message is received, the contract becomes formally established and execution may begin.


Contract Rejection

If the contractor cannot perform the task, it sends a contract rejection message to the manager.

Rejection may occur for several reasons:

  • insufficient resources
  • scheduling conflicts
  • missing capabilities
  • unacceptable deadlines
  • internal policy constraints

Rejection messages allow the manager to understand why the contractor declined the task.


Manager Response to Rejection

When a contractor rejects a directed contract offer, the manager must decide how to proceed.

Several options are available.

Selecting Another Contractor

If the manager knows other agents capable of performing the task, it may send directed offers to them sequentially.

Broadcasting an Announcement

If no obvious contractor exists, the manager may revert to the standard announcement process and invite bids from the network.

Revising the Task

In some cases, rejection may indicate that the task parameters are unrealistic. The manager may revise deadlines, resource requirements, or compensation before attempting to assign the task again.


Directed Contracts in Hierarchical Systems

Directed contracts are particularly valuable in hierarchical task structures.

When contractors break large tasks into subtasks, they often know which agents within their subsystem are best suited to perform each component.

Instead of announcing each subtask to the entire network, the contractor may assign them directly using directed contracts.

For example:

  1. A manager assigns a large analysis task to a contractor.
  2. The contractor divides the task into multiple subtasks.
  3. Each subtask is assigned directly to specialized agents.

This approach enables efficient internal coordination while still preserving the flexibility of the larger Xchange network.


Efficiency Benefits

Directed contracts improve system efficiency in several ways.

Faster Task Assignment

Because they bypass the bidding stage, directed contracts allow tasks to move directly from creation to execution.

Lower Communication Costs

Only the selected contractor receives the task request, reducing network traffic.

Reduced Decision Complexity

Managers do not need to evaluate multiple bids when they already know the appropriate contractor.

Improved Predictability

When tasks are assigned to trusted agents, managers may have greater confidence in execution outcomes.


Preserving Agent Autonomy

Although directed contracts allow managers to propose tasks directly, they do not eliminate agent autonomy.

Contractors remain free to accept or reject contract offers based on their internal policies and constraints. This ensures that agents are never forced to execute tasks against their interests.

Preserving this autonomy is essential for maintaining fairness and cooperation within distributed systems.


Directed Contracts and Negotiation-Based Coordination

Directed contracts complement rather than replace the negotiation-based coordination model of Xchange.

The standard bidding process remains essential for tasks where:

  • the best contractor is unknown
  • multiple execution strategies should be compared
  • competition may improve efficiency or reduce cost

Directed contracts simply provide an additional coordination pathway for situations where negotiation is unnecessary.


Balancing Flexibility and Efficiency

The inclusion of directed contracts illustrates one of the central design goals of the Xchange protocol: balancing flexibility with efficiency.

By supporting both open bidding and direct assignment, the system allows managers to choose the coordination strategy that best fits each task.

Tasks that benefit from competitive evaluation can use the full announcement and bidding cycle, while routine or time-sensitive tasks can be assigned quickly through directed contracts.


Directed Contracts as a Practical Coordination Tool

In real-world distributed systems, coordination mechanisms must accommodate a wide variety of scenarios.

Some tasks require broad participation and competitive negotiation. Others require rapid execution by known specialists.

Directed contracts provide a practical solution for the latter case. They allow managers to leverage existing knowledge about agent capabilities while still maintaining the explicit contract structure that underpins the Xchange protocol.

By integrating directed contracts into the broader task exchange architecture, Xchange ensures that distributed agent systems can coordinate work efficiently across both open networks and tightly coordinated subsystems.