> ## 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 Detection

> How the system detects and initiates collaboration workflows

## Collaboration Detection and Workflow

### Automatic Detection

When the SSE API receives a message containing multiple @-mentions, it automatically:

1. Detects collaboration requirement
2. Initiates planning phase
3. Coordinates agent responses
4. Optionally synthesizes unified response

### Message Structure for Collaboration

Use the existing message endpoint with @-mentions in content:

```javascript theme={null}
const response = await fetch(`/api/assistants/threads/${threadId}/messages`, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${apiKey}`,
        'X-Envole-User-Id': userId,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        content: [{
            type: "text",
            text: "@product @engineering work together on user authentication feature"
        }]
    })
});
```
