> ## 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.graph_utils.check_graph_validity

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### check\_graph\_validity

```python theme={null}
check_graph_validity(allowed_speaker_transitions_dict: dict[str, list[Agent]], agents: list[Agent]) -> None
```

Check the validity of the allowed\_speaker\_transitions\_dict.<br />

<b>Parameters:</b>

| Name                               | Description                                                                                                                                                                                                                                                   |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowed_speaker_transitions_dict` | A dictionary of keys and list as values.<br /><br />The keys are the names of the agents, and the values are the names of the agents that the key agent can transition to.<br /><br />**Type:** dict\[str, list\[[Agent](/docs/api-reference/autogen/Agent)]] |
| `agents`                           | A list of Agents<br /><br />**Type:** list\[[Agent](/docs/api-reference/autogen/Agent)]                                                                                                                                                                       |

<br />
