> For the complete documentation index, see [llms.txt](https://dnotifier.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dnotifier.gitbook.io/product-docs/operations/faq.md).

# FAQ

Frequently asked questions about DNotifier SDKs, transports, limits, and integration patterns.

***

## General

### What is DNotifier?

DNotifier is a realtime messaging and AI platform. SDKs provide WebSocket and HTTP transports, directed 1:1 messaging, chat history, AI prompts, knowledge-base (RAG) APIs, and multi-step workflows with observability.

→ [Platform overview](/product-docs/platform-overview/overview.md)

### Which SDKs are available?

| Language                | Package                                                                                      |
| ----------------------- | -------------------------------------------------------------------------------------------- |
| JavaScript / TypeScript | [@dnotifier-realtime/dnotifier](https://www.npmjs.com/package/@dnotifier-realtime/dnotifier) |
| Dart / Flutter          | [dnotifier](https://pub.dev/packages/dnotifier)                                              |
| Python                  | [dnotifier](https://pypi.org/project/dnotifier/)                                             |

.NET, Android, and iOS native SDKs are coming soon.

→ [Installation](/product-docs/getting-started/installation.md)

### Do I need an account?

Yes. Register at [app.dnotifier.com](https://app.dnotifier.com), create an app, and use the App ID and secret in your SDK constructor.

→ [Getting set up](/product-docs/getting-started/getting-set-up.md)

***

## Transport

### Should I use WebSocket or HTTP?

| Use case                          | Transport |
| --------------------------------- | --------- |
| Live chat, realtime notifications | `ws`      |
| AI, RAG, workflows                | `http`    |

Many apps use **both** — WebSocket in the client, HTTP on the server.

→ [Choose your transport](/product-docs/getting-started/choose-transport.md)

### Does HTTP transport receive `onMessage`?

No. HTTP is request/response. Incoming realtime messages require `transport: "ws"` and a connected client.

### Why does Node.js need `WebSocketImpl`?

Node has no built-in WebSocket client. Pass the `ws` package:

```js
import WebSocket from "ws";
// WebSocketImpl: WebSocket
```

Browsers and Dart use native or package WebSocket support automatically.

→ [Node.js platform guide](/product-docs/platform-guides/nodejs.md)

***

## Messaging

### How does routing work?

Messages are sent from `senderId` to `receiverId` or `receiverIds`. Each connected client authenticates with a `userId`. The receiver must be connected with a matching ID.

There are **no broadcast topics or channel subscriptions**. To notify multiple users, send to an explicit list of IDs.

→ [Understanding messages](/product-docs/getting-started/understanding-messages.md)

### Can two apps use the same `userId`?

The SDK prefixes IDs with your `appId` internally, so collisions across apps are avoided. Within one app, `userId` must be unique per connected logical user.

### How do large files work?

Payloads over `messageSizeLimit` are chunked automatically and reassembled on the receiver. You typically use normal `send()` — chunking is transparent.

→ [Large messages & chunking](/product-docs/realtime-communication/chunking.md)

***

## Chat and history

### How do I load chat history?

Call `fetchChatHistory({ senderId, receiverIds })`. The server responds asynchronously via `onMessage` with the history payload.

→ [Chat history](/product-docs/chat/chat-history.md)

### How do I delete a message?

Use `deleteChatHistoryMessage` or `deleteAIHistoryMessage` with the message ID from metadata or history response.

→ [Delete chat messages](/product-docs/chat/delete-messages.md)

### What does `saveHistory` do?

When `true` (default), the message is stored in chat history. Set `false` for ephemeral signals.

→ [Save history flag](/product-docs/chat/save-history.md)

***

## AI and knowledge base

### Why is `aiEnabled` false?

Your plan may not include AI, or you are on a tier without AI features. Check the dashboard and `getPlanLimits()` after `connect()`.

→ [Troubleshooting — AI not enabled](/product-docs/operations/troubleshooting.md#ai-not-enabled)

### Can I use OpenAI directly?

Use `sendAI` — DNotifier manages the AI pipeline. The legacy `sendWithOpenAI` is deprecated.

→ [Send a prompt](/product-docs/ai/send-prompt.md)

### How does RAG work?

Add documents with `addDocument`, then call `search` or use `useKnowledgeBase: true` in `sendAI` messages.

→ [Knowledge base overview](/product-docs/ai/knowledge-base-overview.md)

### How do I enable AI observability?

Set **`observability: true`** on your `Workflow`, connect with HTTP, and call `runWorkflow`. Find the run under **Dashboard → Workflows** using `executionId`.

→ [How to enable AI workflow observability](/product-docs/observability/ai-workflow-observability.md) · [Observability FAQ](/product-docs/observability/faq.md)

### How do I enable logs?

Pass **`logs: true`** in the `DNotifier` constructor. Session telemetry appears under **Dashboard → Logs**.

→ [How to enable session logs](/product-docs/observability/enable-session-logs.md)

### How do I save AI message history?

Use **`saveHistory: true`** on `sendAI` (default), then load with `fetchAIHistory`.

→ [How to save AI message history](/product-docs/observability/save-ai-message-history.md)

### What is the difference between logs, saveHistory, and observability?

| Flag                  | Purpose                                   |
| --------------------- | ----------------------------------------- |
| `logs: true`          | Ops session telemetry (dashboard Logs)    |
| `saveHistory`         | Product AI history (`fetchAIHistory`)     |
| `observability: true` | Workflow step graph (dashboard Workflows) |

→ [Observability overview](/product-docs/observability/observability.md)

***

## Workflows

### What are workflows?

Named, multi-step pipelines composed of **agents**. Each agent runs logic and can call `sendAI`, `search`, and knowledge-base APIs via `WorkflowContext`.

→ [Workflows overview](/product-docs/workflows-and-agents/overview.md)

### Do workflows work over WebSocket?

No. Use `transport: "http"` and `runWorkflow()` after `connect()`.

### What is observability?

When `observability: true`, execution and step telemetry appear in the DNotifier workflow dashboard, including `executionId` in the run result.

→ [Workflow observability](/product-docs/workflows-and-agents/observability.md) · [Observability FAQ](/product-docs/observability/faq.md)

***

## Security

### Can I put the secret in my React app?

{% hint style="danger" %}
**No** for production public apps. Secrets in client bundles can be extracted. Use a backend proxy.
{% endhint %}

→ [Security best practices](/product-docs/operations/security.md)

### Is traffic encrypted?

Yes. Production endpoints use HTTPS and WSS to `api.dnotifier.com`.

***

## Limits and billing

### Where do I see my limits?

`getPlanLimits()` after `connect()`, and the [dashboard](https://app.dnotifier.com).

→ [Performance & limits](/product-docs/operations/performance.md) · [Pricing & plans](/product-docs/platform-overview/pricing.md)

### What happens when I exceed a limit?

Behavior depends on the limit — sends may fail, AI calls may error, or features may be disabled until the next billing period. Check error messages and dashboard usage.

***

## Platform-specific

### Flutter vs pure Dart?

Same `dnotifier` package. Flutter adds UI lifecycle concerns; pure Dart suits servers and CLI tools.

→ [Flutter platform guide](/product-docs/platform-guides/flutter.md) · [Pure Dart platform guide](/product-docs/platform-guides/pure-dart.md)

### Can I use DNotifier in a browser?

Yes. Use the JavaScript SDK with native `WebSocket` — no `ws` package.

→ [Browser platform guide](/product-docs/platform-guides/browser.md)

***

## Getting help

→ [Troubleshooting](/product-docs/operations/troubleshooting.md) · [Debugging](/product-docs/operations/debugging.md) · [Support & links](/product-docs/appendix/support.md)
