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

# Transparency Mode

> Use the Real-time Digital Human API in transparency mode and connect your own reply pipeline through MQTT.

## Transparency Mode

Transparency Mode lets your realtime digital human session connect to your own conversation pipeline. NavTalk handles the realtime avatar, audio, transcription, and WebRTC stream, while your backend receives user messages through MQTT and sends text replies back for avatar playback.

Set `model=transparency` when connecting to `wss://transfer.navtalk.ai/wss/v2/realtime-chat`. Upon connection, you receive a `conversation.connected.success` event containing the session ID for tracking and the ICE server configuration.

```json theme={null}
{
  "type": "input_audio_buffer.append",
  "audio": "x//z//X/JQAwA/"
}
```

Push PCM16 audio chunks like above. After receiving the `conversation.connected.success` event, use `data.iceServers` to create the WebRTC connection through the same unified WebSocket. WebRTC signaling is handled through the same connection in v2.

## MQTT operator integration

Use the MQTT operator token API to connect a trusted backend or operator agent:

```bash theme={null}
python transparent_mqtt_agent.py --api-key YOUR_NAVTALK_PROJECT_API_KEY
```

The Python agent calls `POST /api/open/v1/mqtt/operator-token` with your project API key in the `license` header. The response includes the broker URL, project ID, topic prefix, MQTT token, and topic templates used by the agent.

```python theme={null}
import requests

response = requests.post(
    "https://api.navtalk.ai/api/open/v1/mqtt/operator-token",
    headers={"license": "YOUR_NAVTALK_PROJECT_API_KEY"},
    timeout=10,
)
token_data = response.json()["data"]
```

The agent subscribes to user messages:

```text theme={null}
{prefix}/{projectId}/+/user
```

For each user message, publish replies to:

```text theme={null}
{prefix}/{projectId}/{sessionId}/reply
```

Final reply payload:

```json theme={null}
{
  "type": "transparent.reply.text",
  "session_id": "SESSION_ID",
  "roomId": "SESSION_ID",
  "source": "operator",
  "text": "Hello, how can I help you?",
  "messageId": "mqtt_agent_1780000000000"
}
```

Streaming replies are also supported with `transparent.reply.text.delta` followed by `transparent.reply.text.done`.

Use Transparency Mode when you want to run your own LLM, CRM, human operator, or business workflow while keeping NavTalk's realtime digital human rendering pipeline.
