> ## Documentation Index
> Fetch the complete documentation index at: https://docs.envole.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Collaboration SSE Events

> Complete reference for all collaboration-related Server-Sent Events

## Complete Collaboration Events

The SSE stream includes 12 specific collaboration events that track the complete collaboration lifecycle:

### Planning Phase Events (4)

1. **`NOTIFICATION_REQUEST_ORCHESTRATION_COLLABORATION_REQUEST`**
   * **Description**: Collaboration detected and planning initiated
   * **When**: Triggered when multiple @-mentions are detected in user message
   * **Purpose**: Indicates system has recognized need for collaboration

2. **`NOTIFICATION_PLAN_ORCHESTRATION_COLLABORATION_PLANNING_INITIATED`**
   * **Description**: Collaboration planning started
   * **When**: System begins analyzing collaboration requirements
   * **Purpose**: Planning phase has begun

3. **`NOTIFICATION_PLAN_ORCHESTRATION_COLLABORATION_PLANNING_IN_PROGRESS`**
   * **Description**: Collaboration planning in progress
   * **When**: During active planning phase
   * **Purpose**: System is determining collaboration strategy

4. **`NOTIFICATION_PLAN_ORCHESTRATION_COLLABORATION_PLANNING_COMPLETED`**
   * **Description**: Collaboration planning completed
   * **When**: Planning phase finishes successfully
   * **Purpose**: Collaboration strategy determined, moving to execution

### Execution Phase Events (4)

5. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_STARTED`**
   * **Description**: Collaboration session started
   * **When**: Active collaboration begins
   * **Purpose**: Agents begin working on the collaborative task
   * **Contains**: List of participating agents and collaboration ID

6. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_ASSISTANT_RESPONSE_IN_PROGRESS`**
   * **Description**: Agent responding
   * **When**: Individual agent is actively generating response
   * **Purpose**: Track which agents are currently responding

7. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_ASSISTANT_RESPONSE_COMPLETED`**
   * **Description**: Agent response completed
   * **When**: Individual agent finishes their contribution
   * **Purpose**: Track completion of individual agent responses

8. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_COMPLETED`**
   * **Description**: All agents finished
   * **When**: All participating agents have completed their responses
   * **Purpose**: Collaboration execution phase complete

### Response Phase Events (3)

9. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_UNIFIED_RESPONSE_STARTED`**
   * **Description**: Unified response generation started
   * **When**: System begins synthesizing individual responses
   * **Purpose**: Creating cohesive response from multiple agent inputs

10. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_NO_UNIFIED_RESPONSE_REQUIRED`**
    * **Description**: No unified response needed
    * **When**: System determines individual responses are sufficient
    * **Purpose**: Skips unification step

11. **`NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_FAILED`**
    * **Description**: Collaboration failed
    * **When**: Error occurs during collaboration process
    * **Purpose**: Indicates collaboration could not complete successfully

### Error Handling Event (1)

12. **`ERROR_INVALID_COLLABORATION_REQUEST`**
    * **Description**: Invalid collaboration request error
    * **When**: Malformed collaboration request detected
    * **Purpose**: Validation error for collaboration setup

## Event Structure for Collaboration

Collaboration events follow the standard SSE event structure with additional collaboration-specific fields:

```javascript theme={null}
{
    "type": "NOTIFICATION_MULTI_ASSISTANT_COLLABORATION_STARTED",
    "eventId": "evt_12345",
    "threadId": "thread_abc123",
    "requestId": "req_567890",
    "eventMessage": {
        "agent": {
            "id": "agent_001",
            "name": "Product Assistant", 
            "handle": "product"
        },
        "content": "Starting collaboration...",
        "collaborationId": "collab_xyz789",                    // Unique collaboration session ID
        "collaboratingAssistants": [                           // Array of participating agents
            {
                "id": "agent_001",
                "name": "Product Assistant",
                "handle": "product"
            },
            {
                "id": "agent_002", 
                "name": "Engineering Assistant",
                "handle": "engineering"
            }
        ],
        "activeAssistantCollaborationRequired": true,          // Whether active assistant participates
        "toolExecutionApprovalRequest": null,
        "timestamp": "2025-08-12T10:30:00Z"
    }
}
```
