Skip to content

Edge Types

edge_types

Edge types — semantic templates for relationships between agents.

Each edge type defines concrete runtime semantics: what each agent can see, how conflicts are resolved, and when the interaction terminates. The compiler translates edge types into per-agent prompts, context filtering, and tool schema filtering.

The five built-in types map to the collaboration taxonomy in Tran et al. (2025):

  • Cooperation — bidirectional transparency, merge outputs
  • Competition — opaque isolation, judge picks best
  • Oversight — asymmetric visibility, overseer adjudicates
  • Delegation — downstream transparent, delegator accepts/rejects
  • Coopetition — selective visibility, domain-specific negotiation

EdgeType

Bases: BaseModel

Base class for all edge types.

Provides common configuration shared across all relationship types.

Parameters:

Name Type Description Default
artifacts

Artifacts that flow along this edge.

required
events

Allowed event types on this edge (extensible strings).

required
max_rounds

Maximum interaction rounds before termination.

required
timeout

Wall-clock timeout per round.

required
on_timeout

Policy when a round times out.

required

Cooperation

Bases: EdgeType

Bidirectional transparent collaboration toward a shared goal.

Both agents can see all shared artifacts and each other's work log. Outputs are merged into the shared artifact.

Parameters:

Name Type Description Default
shared

List of shared resource/topic identifiers that both agents have full visibility into.

required

Competition

Bases: EdgeType

Independent work with judge-based selection of best output.

Competing agents are isolated — they can see the task spec but not each other's work. A resolution strategy selects the winner.

Parameters:

Name Type Description Default
resolve

Strategy for selecting the winning submission. Required — Competition edges without a resolve strategy are rejected at compile time.

required

Oversight

Bases: EdgeType

Asymmetric review relationship.

The overseer sees all artifacts and the overseen agent's work log. The overseen agent sees only feedback comments. The overseer adjudicates quality.

Parameters:

Name Type Description Default
on_deadlock

Escalation policy when max_rounds is reached without resolution.

required

Delegation

Bases: EdgeType

Task assignment from a delegator to a worker.

The worker has full visibility into the task spec and delegator's instructions. The delegator sees a summary of progress. The delegator accepts or rejects the deliverable.

Parameters:

Name Type Description Default
escalation_policy

Policy for escalating issues during delegation.

required

Coopetition

Bases: EdgeType

Mixed cooperation and competition on different aspects.

Agents cooperate on shared interests (full visibility) and compete on conflicting interests (isolated). Resolution is domain-specific.

Drawn from Tran et al. (2025, §4.2.3).

Parameters:

Name Type Description Default
cooperate_on

Aspects where agents share information freely.

required
compete_on

Aspects where agents work independently.

required
resolve

Strategy for resolving competitive aspects.

required