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

# autogen.UndefinedNextAgentError

<h2 id="autogen.UndefinedNextAgentError" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">UndefinedNextAgentError</span>
</h2>

```python theme={null}
UndefinedNextAgentError(message: str = 'The provided agents list does not overlap with agents in the group.')
```

Exception raised when the provided next agents list does not overlap with agents in the group.

<b>Parameters:</b>

| Name      | Description                                                                                                 |
| --------- | ----------------------------------------------------------------------------------------------------------- |
| `message` | **Type:** str<br /><br />**Default:** 'The provided agents list does not overlap with agents in the group.' |
