> 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/ai/example-ai-assistant.md).

# Build an AI assistant

A minimal **backend AI assistant** that accepts user questions over HTTP, maintains **sessions** per user, and optionally enables **dashboard logging**.

## What you will build

```
  Client (web/mobile)
         │ POST /api/chat { userId, message }
         ▼
  Your API server (DNotifier HTTP)
         │ sendAI + sessionId
         ▼
  DNotifier AI → JSON answer
```

{% hint style="info" %}
This example uses **`transport: "http"`** only. Realtime chat between humans uses WebSocket separately — see [Chat overview](/product-docs/chat/overview.md).
{% endhint %}

## Features demonstrated

| Feature        | SDK API                             |
| -------------- | ----------------------------------- |
| Authentication | `connect()`                         |
| Prompts        | `sendAI` with chat-style `messages` |
| Multi-turn     | `sessionId` continuation            |
| Ops logging    | `logs: true` (optional)             |

## Language guides

| Language                | Guide                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------ |
| JavaScript / TypeScript | [javascript-typescript.md](/product-docs/ai/example-ai-assistant/javascript-typescript.md) |
| Dart / Flutter          | [dart-flutter.md](/product-docs/ai/example-ai-assistant/dart-flutter.md)                   |

## Extensions

* Add **`useKnowledgeBase: true`** → [RAG bot example](/product-docs/ai/example-rag-bot.md)
* Route complex logic through **workflows** → [Intent router](/product-docs/workflows-and-agents/example-intent-router.md)
* Pair with WebSocket chat for human handoff → [Combined use cases](/product-docs/platform-overview/use-cases/combined.md)

## Next steps

* [**Session logging**](/product-docs/ai/session-logging.md)
* [**AI sessions**](/product-docs/ai/sessions.md)
