# Class ParallelProtocol

Parallel collaboration protocol.

#### Hierarchy

- BaseProtocol
  - ParallelProtocol

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:209

##### Index

### Constructors

constructor

### Properties

logger
session
cancelled
options
pattern

### Methods

cancel
createSession
executeAgentTask
validateAgents
execute

## Constructors

### constructor

- new ParallelProtocol(options?: ProtocolOptions): ParallelProtocol

  #### Parameters

  - options: ProtocolOptions = {}

  #### Returns ParallelProtocol

  Inherited from BaseProtocol.constructor

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:42

## Properties

### `Protected` `Readonly` logger

logger: ILogger

Inherited from BaseProtocol.logger

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:38

### `Protected` session

session: CollaborationSession | null = null

Inherited from BaseProtocol.session

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:39

### `Protected` cancelled

cancelled: boolean = false

Inherited from BaseProtocol.cancelled

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:40

### `Protected` `Readonly` options

options: ProtocolOptions = {}

Inherited from BaseProtocol.options

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:42

### `Readonly` pattern

pattern: "parallel" = ...

Overrides BaseProtocol.pattern

- Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:210

## Methods

### cancel

- cancel(reason: string): void

  #### Parameters

  - reason: string

  #### Returns void

  Inherited from BaseProtocol.cancel

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:51

### `Protected` createSession

- createSession(): CollaborationSession

  #### Returns CollaborationSession

  Inherited from BaseProtocol.createSession

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:57

### `Protected` executeAgentTask

- executeAgentTask(
  agent: IAgent,
  task: Task,
  previousResults?: TaskResult[],
  ): Promise<Result<TaskResult, AgentError>>

  #### Parameters

  - agent: IAgent
  - task: Task
  - `Optional` previousResults: TaskResult[]

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

  Inherited from BaseProtocol.executeAgentTask

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:62

### `Protected` validateAgents

- validateAgents(
  config: CollaborationConfig,
  agents: Map<string, IAgent>,
  ): Result<void, AgentError>

  #### Parameters

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

  #### Returns Result<void, AgentError>

  Inherited from BaseProtocol.validateAgents

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:85

### execute

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

  #### Parameters

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

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

  Overrides BaseProtocol.execute

  - Defined in packages/nexus-agents/src/agents/collaboration/collaboration-protocol.ts:212