# Class ProtocolFactory

Factory for creating collaboration protocols.

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

##### Index

### Constructors

constructor

### Methods

create
execute

## Constructors

### constructor

- new ProtocolFactory(options?: ProtocolOptions): ProtocolFactory

  #### Parameters

  - options: ProtocolOptions = {}

  #### Returns ProtocolFactory

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

## Methods

### create

- create(pattern: CollaborationPattern): ICollaborationProtocol

  #### Parameters

  - pattern: CollaborationPattern

  #### Returns ICollaborationProtocol

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

### 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-protocol.ts:300