Building on Ubidots often means juggling between your code editor, docs, and even support to answer questions or fix errors. That context switching adds friction, breaks focus, and slows down development. The AI Assistant is here to change that by offering real-time, contextual help right inside the editor — whether you're working on a UbiFunction or a custom Page.
Whether you need help debugging a script, generating a sample payload, building a UI from scratch, or deploying with confidence, the assistant is trained to guide you every step of the way. Each function and page gets its own dedicated chat thread, so your conversations stay relevant and persistent. Ask questions, get answers, and take action. All without leaving your workspace.
Requirements
An Ubidots account on an Industrial plan or above for the UbiFunctions assistant.
An Ubidots account on an Enterprise plan for the Pages assistant.
1. What's the AI Assistant?
The AI Assistant is a contextual chat panel embedded directly into the code editor of both UbiFunctions and Pages. Each function and each page has its own dedicated chat thread, keeping conversations focused on that specific item's logic, history, and structure. You can open or close the assistant at any time, and past exchanges are preserved to maintain continuity.
The assistant can read all of the files associated with the function or page you're working on and provide tailored suggestions or propose improvements. These suggestions can be accepted and applied directly to the editor. It's trained with Ubidots-specific knowledge and the relevant supported languages and libraries for each module, giving it the foundation to provide relevant, technically accurate responses.
UbiFunctions assistant: supports Python and Node.js scripting.
Pages assistant: supports HTML, JavaScript, CSS, and React, and has awareness of all page files (manifest.toml, script.js, body.html, style.css, and any static files).
1.1. Usage and billing
Each account includes 1,000 AI credits per month at no additional cost, shared across all assistants (UbiFunctions and Pages). This monthly allowance acts as a soft limit, and you'll receive a notification as you approach it.
How consumption works
Usage is measured in AI credits.
Each message you send to the Assistant consumes a small number of credits. This comsumption depends on factors such as:
The length of your prompt and the length of the Assistant's output.
How much data the Assistant has to look up to come up with an answer or code.
How long your current conversation has been running: The Assistant re-reads the earlier messages each turn so it stays in context — that means the 10th message in a long conversation costs more than the 1st.
Overages and limits
Credits are billed in blocks of 1,000 credits.
Cost per block: $10 USD.
Charges apply only when monthly usage exceeds the included 1,000 credits.
2. AI Assistant in UbiFunctions
2.1. How to use it
Go to “dev center” ⟶ “functions”.
Click on the function you want to work on or create a new one.
Once in the function editor page, click on the “AI Assistant” button located on the upper right corner.
You can now ask the assistant questions about your function to improve it or create one from scratch.
By clicking on the trash can icon, you can clear the chat. This effectively resets the conversation, making the conversation context disappear.
3. AI Assistant in Pages
3.1. How to use it
Go to Dev Center → Pages.
Click on the page you want to work on, or create a new one.
Once in the page editor, click the AI Assistant button in the upper right corner.
Ask the assistant to help you write or improve your HTML, JavaScript, CSS, or React code — or generate a page from scratch.
To clear the conversation, click the trash can icon. This resets the chat and removes all prior context.
The assistant is aware of all files in your page (manifest.toml, script.js, body.html, style.css, and static files), so you can ask questions or request changes that span multiple files at once.
Note: To ensure stable responses, avoid sending prompts longer than 2,000 characters. Extremely long inputs may cause errors or incomplete outputs. |