# Interface ICollaborationProtocol

Base interface for collaboration protocols.

NOTE: This interface is defined here (not in collaboration-protocol.ts) to avoid circular dependencies. Protocol implementations import this interface, and collaboration-protocol.ts imports the implementations.

interface ICollaborationProtocol {
pattern: CollaborationPattern;
execute(
config: CollaborationConfig,
agents: Map<string, IAgent>,
): Promise<Result<CollaborationResult, AgentError>>;
cancel(reason: string): void;
}

#### Implemented by

- ConsensusProtocol
- ReviewProtocol

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-types.ts:266

##### Index

### Properties

pattern

### Methods

execute
cancel

## Properties

### `Readonly` pattern

pattern: CollaborationPattern

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-types.ts:267

## Methods

### execute

- execute(
  config: CollaborationConfig,
  agents: Map<string, IAgent>,
  ): Promise<Result<CollaborationResult, AgentError>>

  #### Parameters

  - config: CollaborationConfig
  - agents: Map<string, IAgent>

  #### Returns Promise<Result<CollaborationResult, AgentError>>

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-types.ts:268

### cancel

- cancel(reason: string): void

  #### Parameters

  - reason: string

  #### Returns void

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-types.ts:272