> ## 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.realtime.experimental.RealtimeAgent

<h2 id="autogen.agentchat.realtime.experimental.RealtimeAgent" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

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

```python theme={null}
RealtimeAgent(
    *,
    name: str,
    audio_adapter: RealtimeObserver | None = None,
    system_message: str = 'You are a helpful AI Assistant.',
    llm_config: LLMConfig | dict[str, Any] | None = None,
    logger: Logger | None = None,
    observers: list[RealtimeObserver] | None = None,
    **client_kwargs: Any
)
```

(Experimental) Agent for interacting with the Realtime Clients.<br />

<b>Parameters:</b>

| Name              | Description                                                                                                                                            |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `name`            | **Type:** str                                                                                                                                          |
| `audio_adapter`   | **Type:** [RealtimeObserver](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeObserver) \| None<br /><br />**Default:** None        |
| `system_message`  | **Type:** str<br /><br />**Default:** 'You are a helpful AI Assistant.'                                                                                |
| `llm_config`      | **Type:** [LLMConfig](/docs/api-reference/autogen/llm_config/LLMConfig) \| dict\[str, typing.Any] \| None<br /><br />**Default:** None                 |
| `logger`          | **Type:** logging.Logger \| None<br /><br />**Default:** None                                                                                          |
| `observers`       | **Type:** list\[[RealtimeObserver](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeObserver)] \| None<br /><br />**Default:** None |
| `**client_kwargs` | **Type:** Any                                                                                                                                          |

### Instance Attributes

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

#### logger

<br />

Get the logger for the agent.

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

#### realtime\_client

<br />

Get the OpenAI Realtime Client.

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

#### registered\_realtime\_tools

<br />

Get the registered realtime tools.

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

#### system\_message

<br />

Get the system message for the agent.

### Instance Methods

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

#### register\_observer

```python theme={null}
register_observer(self, observer: RealtimeObserver) -> None
```

Register an observer with the Realtime Agent.<br />

<b>Parameters:</b>

| Name       | Description                                                                                                                                     |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `observer` | The observer to register.<br /><br />**Type:** [RealtimeObserver](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeObserver) |

<br />

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

#### register\_realtime\_function

```python theme={null}
register_realtime_function(
    self,
    *,
    name: str | None = None,
    description: str | None = None
) -> Callable[[~F | Tool], Tool]
```

Decorator for registering a function to be used by an agent.<br />

<b>Parameters:</b>

| Name          | Description                                                                                    |
| ------------- | ---------------------------------------------------------------------------------------------- |
| `name`        | The name of the function.<br /><br />**Type:** str \| None<br /><br />**Default:** None        |
| `description` | The description of the function.<br /><br />**Type:** str \| None<br /><br />**Default:** None |

<b>Returns:</b>

| Type                                                                                                                | Description                                                                    |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Callable\[\[\~F \| [Tool](/docs/api-reference/autogen/tools/Tool)], [Tool](/docs/api-reference/autogen/tools/Tool)] | Callable\[\[Union\[F, Tool]], Tool]: The decorator for registering a function. |

<br />

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

#### run

```python theme={null}
run(self) -> None
```

Run the agent.

<br />

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

#### start\_observers

```python theme={null}
start_observers(self) -> None
```

<br />
