# Overview

The Datacake AI Assistant is an intelligent assistant built into the Datacake platform. It helps you manage your IoT devices, analyze sensor data, build dashboards, create automation rules, troubleshoot decoders, and more - all through natural language conversation.

> **Important Notice:** The AI Assistant is a fully functional feature that you can use in your daily workflows today. It delivers real results -- from answering questions about your devices to building complete dashboards. However, like all AI-powered tools, its responses are generated by a language model and may not always be accurate or complete. Always review the Assistant's output before acting on it, especially when making changes to your workspace. We are continuously expanding the Assistant's capabilities and improving its accuracy, but the responsibility to verify results remains with you.

## Getting Started

### Opening the Assistant

The AI Assistant lives in a slide-out panel on the right side of the Datacake interface. Click the AI Assistant button to open it. You can resize the panel by dragging its left edge.

#### Conversations and Threads

Every conversation is a **thread**. You can:

* **Start a new thread** by clicking the "New chat" button in the panel header.
* **Switch between threads** using the thread switcher dropdown. Previous conversations are preserved so you can pick up where you left off.
* **Delete threads** you no longer need from the thread switcher.

All conversations are stored locally in your browser. They persist across sessions but are not synced between devices.

## Skills System

The AI Assistant uses a **skills system** to stay focused and effective. Instead of loading every capability at once, the Assistant activates a specific skill based on what you're asking about. Each skill gives the Assistant a specialized set of tools and domain knowledge.

There are seven skills available:

| Skill               | Description                                                           |
| ------------------- | --------------------------------------------------------------------- |
| **General**         | General IoT questions, basic device lookup                            |
| **Devices**         | Deep device exploration -- fields, measurements, tags, custom queries |
| **Analytics**       | Fleet statistics, rankings, historical data analysis, trends          |
| **Rules**           | Create and manage automation rules and notifications                  |
| **Dashboards**      | Build and edit workspace and device dashboards                        |
| **Workspace**       | Manage folders, tags, products, and claim devices                     |
| **Decoder & Debug** | Troubleshoot payload decoders and inspect debug logs                  |

### How the Right Skill is Selected

You don't need to think about skills in most cases. The Assistant handles skill selection automatically:

1. **Auto-detection on your first message.** When you start a new conversation, the Assistant classifies your message and activates the most relevant skill. For example, asking "What's the average temperature across my fleet?" activates the Analytics skill, while "Create a rule that alerts me when humidity exceeds 80%" activates the Rules skill.
2. **Manual selection.** You can also pick a skill yourself using the skill selector pills in the chat input area. This is useful when you know exactly what you want to do.
3. **Automatic mid-conversation switching.** If you change topics during a conversation, the Assistant can switch skills on the fly. For example, if you start by exploring devices and then ask to build a dashboard, the Assistant switches to the Dashboards skill and continues without interruption.

#### How It Works Under the Hood

When you send a message, the Assistant translates your natural language input into actions using Datacake's internal APIs. Each skill provides a set of tools that the Assistant can call -- these tools execute GraphQL queries and mutations against the Datacake API to read data, create resources, or modify configurations. The Assistant decides which tools to call, executes them in sequence, interprets the results, and responds in plain language. For complex questions, the Assistant may chain multiple tool calls together in a single turn to gather the information it needs.

### Page-Aware Context

The AI Assistant is aware of which page you're currently viewing in Datacake. This means:

* **On a device page:** The Assistant already knows the device ID. You can say "Show me the current temperature" without specifying which device.
* **On a dashboard page:** The Assistant can load and edit that dashboard directly. Just say "Add a humidity chart" and it knows which dashboard you mean.
* **On a rule page:** The Assistant can inspect or modify the rule you're looking at.
* **On the devices list:** The Assistant knows you're browsing devices and can help you search, filter, or explore.

This page context is shown in a small bar below the panel header so you always know what the Assistant sees.

## What You Can Do

### General IoT Questions

The General skill handles broad IoT and Datacake questions. Use it when you need help understanding concepts or getting oriented.

**Example prompts:**

* "What is MQTT and how does it work with Datacake?"
* "How do I set up a LoRaWAN device?"
* "What's the difference between HTTP and MQTT integrations?"
* "List all my devices"

### Explore Devices

The Devices skill lets you dive deep into individual devices -- their configuration, measurement fields, current values, tags, and metadata.

**Example prompts:**

* "Show me all devices in my workspace"
* "What fields does this device have?"
* "What's the current battery level of my temperature sensors?"
* "Find all devices tagged with 'building-a'"
* "Show me the details of device XYZ"

The Assistant can also run custom GraphQL queries against the Datacake API when the built-in tools aren't enough for a complex question.

### Analyze Your Fleet

The Analytics skill is designed for questions about data across your entire fleet -- averages, rankings, outliers, trends, and historical analysis.

**Example prompts:**

* "What's the average temperature across all my sensors?"
* "Which 5 devices have the lowest battery?"
* "How many doors are currently open?"
* "How often was CO2 above 1000 ppm last week in the office?"
* "Compare humidity levels between Building A and Building B"
* "Give me an overview of my workspace"
* "What's the temperature trend for this device over the past month?"

The Assistant understands natural language for sensor types -- "how warm is it" maps to temperature, "air quality" maps to CO2/VOC, "noise level" maps to loudness, and so on.

**Historical analysis** is particularly powerful. The Assistant can compute statistics like averages, min/max, time above or below a threshold, and trend direction -- all without dumping raw data into the conversation.

### Create and Manage Rules

The Rules skill lets you create, inspect, update, and delete automation rules through conversation.

**Example prompts:**

* "Create a rule that sends me an email when temperature exceeds 30 degrees"
* "Show me all my active rules"
* "What does this rule do?" (when viewing a rule page)
* "Update this rule to also trigger on humidity above 80%"
* "Delete the offline notification rule"

When creating rules, the Assistant will ask whether you want a **product-level rule** (monitors all devices of a type -- more efficient) or a **device-level rule** (targets specific devices only) when it's relevant.

### Build and Edit Dashboards

The Dashboards skill lets you build workspace dashboards and device dashboards by describing what you want in plain language.

**Example prompts:**

* "Build me a dashboard that shows temperature and humidity for all my sensors"
* "Add a line chart showing the last 24 hours of power consumption"
* "Create a table with all devices, their online status, and current temperature"
* "Add a value widget for battery level with a gauge that shows green above 50% and red below 20%"
* "Rearrange the widgets so the charts are full-width"
* "Remove the old humidity widget"

The Assistant builds dashboards iteratively -- adding, configuring, and positioning widgets one by one. All changes are collected in a draft, and you'll be asked to confirm before anything is saved.

**Device dashboards** work the same way. When you're on a device page, the Assistant automatically works with that device's dashboard.

### Manage Your Workspace

The Workspace skill helps you organize devices with folders and tags, manage products, and claim devices into workspaces.

**Example prompts:**

* "Create folders based on my device tags"
* "What tags are available in this workspace?"
* "Show me the current folder structure"
* "Reorganize my folders by location"
* "List all products in this workspace"
* "Claim device ABC into my production workspace"

### Troubleshoot Decoders and Debug Logs

The Decoder & Debug skill is your go-to for data ingestion issues. It can read debug logs, inspect decoder code, test decoders with sample payloads, and help you fix parsing errors.

**Example prompts:**

* "Show me the recent debug log for this device"
* "Why isn't my device sending data?"
* "Show me the payload decoder for this product"
* "Test this decoder with the last received payload"
* "Help me write a LoRaWAN decoder that parses temperature and humidity from a 4-byte payload"
* "Fix the decoder -- it's parsing the wrong byte order"

The Assistant understands the debug log format, can extract raw payloads, and will test any decoder changes before saving them. Since decoders are shared across all devices of the same product, the Assistant will remind you of this before making changes.

### Confirmation for Changes

The AI Assistant distinguishes between **read operations** (looking up data, listing devices, checking status) and **write operations** (creating rules, saving dashboards, updating decoders, modifying folders).

* **Read operations** execute automatically. The Assistant fetches the data it needs without asking.
* **Write operations** always require your confirmation. Before any change is applied, the Assistant describes what it intends to do in plain language and waits for you to approve or deny. You'll see a confirmation prompt in the chat with "Confirm" and "Deny" buttons.

This means you can safely ask the Assistant to do things like "create a rule" or "save this dashboard" without worrying about accidental changes -- you always get the final say.

## Advanced Controls

### Reasoning Effort

Control how much the Assistant "thinks" before responding. Available in the chat input area:

* **Low** -- Quick, concise answers. Best for simple lookups and straightforward questions.
* **Medium** -- Balanced reasoning. Good default for most tasks.
* **High** -- Deep reasoning. Use for complex analysis, multi-step workflows, or when you need the Assistant to think through a problem carefully.

### Text Verbosity

Control how detailed the Assistant's responses are:

* **Low** -- Brief, to-the-point responses.
* **Medium** -- Standard detail level.
* **High** -- Thorough explanations with more context.

### Code Interpreter

When enabled, the Assistant can write and execute code to process data, perform calculations, or generate formatted outputs. This is useful for complex data transformations or custom analysis that goes beyond the built-in tools.

### Token Usage

The panel displays token usage for the current thread, showing how many tokens have been consumed across all messages. This helps you keep track of resource usage during longer conversations.

## Pricing and Usage Limits

### Free Tier

Every Datacake user receives **1,000,000 tokens** to use with the AI Assistant at no cost. This allowance is tracked automatically and applies across all conversations in your account. For most users, this is enough to explore the Assistant's capabilities extensively.

You can monitor your token consumption in the usage bar displayed in the chat panel.

#### What Happens When the Free Tier Is Exhausted

Once your free token allowance is used up, the AI Assistant will no longer be available for new conversations. You will see a notification in the chat panel with a **contact button** to reach the Datacake team.

### Paid Plan

To continue using the AI Assistant beyond the free tier, contact us to activate the paid plan:

* **20 EUR per user per month**
* Includes a virtually unlimited token allowance for regular usage

#### Fair Use Policy

{% hint style="warning" %}
The paid plan is designed to support productive, regular use of the AI Assistant. Datacake reserves the right to limit or suspend access in cases of **excessive** or **abusive** usage that results in disproportionate costs. Such cases are rare under normal use and will be communicated to the affected user before any action is taken.
{% endhint %}

## Tips and Best Practices

* **Be specific.** "What's the average temperature in Building A this week?" works better than "Tell me about temperatures."
* **Let page context work for you.** Navigate to the device, dashboard, or rule you want to work with before asking the Assistant about it. It picks up the context automatically.
* **Use threads for different topics.** Start a new thread when switching to an unrelated task. This keeps conversations focused and helps the Assistant maintain context.
* **Trust the skill system.** You usually don't need to select a skill manually. The Assistant picks the right one based on your question and switches when needed.
* **Review before confirming.** When the Assistant proposes changes (creating rules, saving dashboards, updating decoders), read the summary carefully before confirming. The Assistant describes changes in plain language so you know exactly what will happen.
* **Ask follow-up questions.** The Assistant remembers the full conversation. You can say "now do the same for humidity" or "change the threshold to 25" without repeating the full context.

## Known Limitations

### No Undo for Confirmed Actions

Once you confirm a write operation (creating a rule, saving a dashboard, updating a decoder, modifying folders), the change is applied immediately. There is no built-in undo functionality. Always review the Assistant's summary carefully before confirming, and make sure you understand what will be changed.

### Large Fleets and Long Time Ranges

Querying or analyzing data from a large number of devices simultaneously or over long historical time ranges may lead to:

* Slow response times
* Incomplete or truncated results
* Failed queries due to timeouts

For best results:

* Limit analysis to a manageable subset of devices rather than the entire fleet at once.
* Use shorter time windows (e.g. last 24 hours or last 7 days) instead of months or years.
* Break large requests into smaller, more focused queries.

The AI Assistant is optimized for targeted analysis and interactive exploration, not large-scale bulk data processing.

### Conversation Memory

The Assistant maintains context within a conversation thread, but there are practical limits. Very long conversations may cause the Assistant to lose track of earlier details or exceed the model's context window. If you notice the Assistant forgetting earlier context, start a new thread and restate the key information.

### Dashboard Support

The Assistant can build and modify workspace dashboards and device dashboards with a wide range of widget types. However, very complex or highly customized dashboard layouts may require manual fine-tuning after the Assistant has created the initial structure.

## Annex: Data Handling and Privacy

### AI Provider

The Datacake AI Assistant is powered by **OpenAI**. All AI requests are routed through a Datacake AI proxy -- your browser never communicates directly with OpenAI's servers. The proxy authenticates requests on your behalf and relays them to the OpenAI API.

### Conversation Storage

All conversation threads -- including messages, titles, tags, and usage statistics -- are stored **exclusively in your browser's local database** (IndexedDB). No conversation data is sent to or stored on Datacake servers.

This means:

* Your conversations are private to the browser and device you are using.
* Conversations do **not** sync across devices or browsers.
* Clearing your browser data (cache, site data) will permanently delete all conversations.
* Datacake has no access to your conversation history.

### Data Sent to OpenAI

When you send a message, the conversation context is transmitted to OpenAI through the Datacake proxy for processing. OpenAI may retain transient session data to enable multi-turn conversations within a session. Skill classification requests (used to auto-detect the right skill on your first message) are not retained by OpenAI.

Datacake uses OpenAI's API tier, which means data sent through the API is **not used to train OpenAI's models** (per [OpenAI's API data usage policy](https://openai.com/enterprise-privacy/)).

### What Data is Transmitted

The following data may be included in requests to the AI provider:

* Your messages and the Assistant's responses
* Workspace metadata (workspace name, workspace ID) for context
* Device data, measurement values, or configuration details when you ask the Assistant to look something up (tool call results)
* Navigation context (which page you are currently viewing)

**Not transmitted:** Passwords, personal API keys, or authentication tokens are never included in the AI conversation context.

### No Server-Side Conversation Logging

Datacake does not log, store, or persist your AI Assistant conversations on its own servers. The proxy relays requests and responses in real time without archiving conversation content.

### Your Responsibility: Sensitive Information

While Datacake does not automatically transmit passwords, API keys, or other credentials to the AI provider, **anything you type into the chat is sent to OpenAI for processing**. This includes free-text messages and any information you voluntarily share in the conversation.

**Do not enter sensitive, confidential, or personally identifiable information into the AI Assistant chat.** This includes, but is not limited to:

* Passwords, secrets, or API keys
* Personal data of third parties (names, addresses, contact details)
* Financial information (credit card numbers, bank details)
* Health or medical data
* Trade secrets or proprietary business information not intended for third-party processing

You are solely responsible for the content you submit to the AI Assistant. Datacake cannot control, filter, or redact information you choose to share in the chat before it is transmitted to the AI provider.

## Disclaimer of Liability

Datacake provides the AI Assistant as a productivity tool on an "as is" basis. By using the AI Assistant, you acknowledge and agree that:

1. **No guarantee of accuracy.** The AI Assistant may produce incorrect, incomplete, or outdated responses. Always verify critical information independently before acting on it, especially for device configuration changes, automation rules, or decoder modifications.
2. **User-submitted content.** Datacake is not liable for any consequences arising from sensitive, confidential, or personal information that you voluntarily submit to the AI Assistant. It is your responsibility to ensure that the information you share complies with applicable data protection regulations and your organization's policies.
3. **Third-party processing.** By using the AI Assistant, you acknowledge that your messages are processed by OpenAI, a third-party provider, subject to their own terms of service and privacy policies.
4. **No liability for AI actions.** While write operations require explicit user confirmation, Datacake is not liable for any damages resulting from changes made to your workspace, devices, dashboards, rules, or decoders based on AI Assistant suggestions that you confirmed.

## Compliance

Use of the AI Assistant is subject to the [Datacake Privacy Policy](https://datacake.co/legal/privacy-policy) and applicable data protection laws, including the General Data Protection Regulation (GDPR).

* **Datacake infrastructure.** Datacake processes and stores workspace data within its own infrastructure, located in the European Union.
* **Data transfer to the United States.** AI-related requests are processed via OpenAI API endpoints located in the United States. When using the AI Assistant, data may be transferred outside the European Union for the purpose of generating AI responses.
* **Data Processing Agreement.** A Data Processing Agreement (DPA) with OpenAI is in place. Under this agreement, OpenAI acts as a data processor/sub-processor and is obligated to handle data in accordance with applicable data protection laws (GDPR).
* **Data access.** Data may be accessed by Datacake systems (for feature functionality), the Datacake internal team (limited to debugging, support, and improvement), and OpenAI systems (for request processing only).

For questions about data handling, compliance, or to request deletion of any transient data, contact Datacake support.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datacake.de/ai-assistant/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
