> ## 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.agentchat.group.NestedChatTarget

<h2 id="autogen.agentchat.group.NestedChatTarget" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

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

```python theme={null}
NestedChatTarget(**data: Any)
```

Target that represents a nested chat configuration.<br />Create a new model by parsing and validating input data from keyword arguments.<br />Raises \[`ValidationError`]\[pydantic\_core.ValidationError] if the input data cannot be
validated to form a valid model.<br />`self` is explicitly positional-only to allow `self` as a field name.

<b>Parameters:</b>

| Name     | Description   |
| -------- | ------------- |
| `**data` | **Type:** Any |

### Class Attributes

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

#### model\_config

<br />

<br />

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

#### nested\_chat\_config

<br />

<br />

### Instance Methods

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

#### can\_resolve\_for\_speaker\_selection

```python theme={null}
can_resolve_for_speaker_selection(self) -> bool
```

Check if the target can resolve for speaker selection. For NestedChatTarget the nested chat must be encapsulated into an agent.

<br />

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

#### create\_wrapper\_agent

```python theme={null}
create_wrapper_agent(
    self,
    parent_agent: ConversableAgent,
    index: int
) -> ConversableAgent
```

Create a wrapper agent for the nested chat.

<b>Parameters:</b>

| Name           | Description                |
| -------------- | -------------------------- |
| `parent_agent` | **Type:** ConversableAgent |
| `index`        | **Type:** int              |

<br />

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

#### display\_name

```python theme={null}
display_name(self) -> str
```

Get the display name for the target.

<br />

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

#### needs\_agent\_wrapper

```python theme={null}
needs_agent_wrapper(self) -> bool
```

Check if the target needs to be wrapped in an agent. NestedChatTarget must be wrapped in an agent.

<br />

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

#### normalized\_name

```python theme={null}
normalized_name(self) -> str
```

Get a normalized name for the target that has no spaces, used for function calling

<br />

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

#### resolve

```python theme={null}
resolve(
    self,
    groupchat: GroupChat,
    current_agent: ConversableAgent,
    user_agent: ForwardRef('ConversableAgent') | None
) -> SpeakerSelectionResult
```

Resolve to the nested chat configuration.

<b>Parameters:</b>

| Name            | Description                                      |
| --------------- | ------------------------------------------------ |
| `groupchat`     | **Type:** GroupChat                              |
| `current_agent` | **Type:** ConversableAgent                       |
| `user_agent`    | **Type:** ForwardRef('ConversableAgent') \| None |

<br />
