An app can have its own assistant that answers with AI: it informs the clients of a salon, helps fill in a form, sums up a catalog. For now, it only answers in the preview of the app, to you. In the published app, it tells your visitors that the function is not available yet.
Add an assistantLink to the Add an assistant section
Ask Moon AI for it while you build the app, saying what the assistant must know and how it should answer:
Add an assistant: visitors ask a question about the salon (opening hours, prices, booking) and it answers in two or three sentences.Moon AI writes the assistant into the app and puts what it must know in its instructions. In the code of the app, the assistant goes through moon.ai.chat(), which returns the answer as it is written. Moon AI also makes sure the app stays useful without it, since your visitors don’t have it yet.
The assistant reads and writes text only: no image, no file, no tool. The model is picked automatically.
Try it in the previewLink to the Try it in the preview section
- Open the Library › “Apps”, then “Manage” on the app.
- In “Versions”, click “Preview”: the version opens in a new tab.
- Write to the assistant as a visitor would.
The AI only answers in a preview opened from Moon AI, for you alone. If you reload the preview page, or after 5 minutes without a message, open the preview again from the “Manage” window. Someone else who opens the address of the preview sees the app without the AI. To try an app before its first publication, see Try a version.
Who paysLink to the Who pays section
The AI of an app is paid from the developer API wallet of the workspace, at the price of the API, in euros. It doesn’t count toward your Moon AI usage limit, and your visitors never pay anything.
That is why only the owner and the administrators of the workspace get the AI in the preview and set the “AI” screen. For another member of a team workspace, the screen says so: “The AI of an app is paid from the API wallet of the workspace: its owner and its administrators set it.”
The “AI” screen shows the balance (“The API wallet holds …”). When it is empty, the assistant stops answering and the app shows “The service is temporarily unavailable.”: top up the wallet (see Top up).
The “AI” screenLink to the The “AI” screen section
Open the Library › “Apps”, then “Manage” on the app: the “AI” screen is in the window. It shows what the app spent (“Spent in the last 24 hours”, “Spent in the last 30 days”) and its settings:
| Setting | At the start | What you can choose |
|---|---|---|
| “Cap per 24 hours (€)” | €5 | From €0.50 to €100 |
| “Cap per 30 days (€)” | €20 | From €0.50 to €1,000, and not less than the cap per 24 hours |
| “Messages per visitor and per hour” | 30 | From 1 to 30 |
| “Who can use the AI” | “Signed-in visitors” | “Signed-in visitors” or “Anyone” |
Click “Save” after a change. Both caps cover the last 24 hours and the last 30 days, on a rolling basis. “Who can use the AI” applies to the visitors of the published app: it changes nothing as long as the AI isn’t open to them.
The shared cap of the workspaceLink to the The shared cap of the workspace section
All the apps of the same workspace also share a cap: €20 per 24 hours and €100 per 30 days. When it is reached, their assistants stop until the period frees up. Moon AI sets this cap: to have it raised, write to support.
Close to a capLink to the Close to a cap section
Before each answer, Moon AI checks that the longest possible answer fits in what is left. Close to a cap, a request that could cost more than what is left is refused, while a shorter request may still go through.
The emailsLink to the The emails section
You get an email:
- when the app has used 80% of a cap (“Your app has used 80% of its AI cap”);
- when it refuses its longest requests, for lack of room under the cap (“Your app now refuses its longest requests”);
- when the cap is reached (“The AI cap of your app is reached”);
- when the shared cap of the apps of the workspace is reached.
Each email gives the spending and the cap, in euros. It goes out at most once a day for the 24-hour cap, once a month for the 30-day cap. The owner of the workspace and its billing contact get a copy.
For the visitors of the published appLink to the For the visitors of the published app section
The AI isn’t open to visitors yet. The publishing window reminds you (“The AI of the app is not available to visitors yet.”): in the published app, the assistant answers “This function is not available yet.” The rest of the app works as usual.
PrivacyLink to the Privacy section
- Moon Blur masks the sensitive data it detects in the messages before they are sent to the model. If it can’t scan a message, nothing is sent.
- The app only receives the text of the answer, or a fixed sentence when there is a refusal: never a key, a cost or the name of a provider.
The messages of the assistantLink to the The messages of the assistant section
When the assistant can’t answer, the app shows a fixed sentence:
| Message | What happens |
|---|---|
| “This function is not available yet.” | In the published app: the AI isn’t open to visitors yet. |
| “The service is temporarily unavailable.” | The wallet is empty, a cap is reached or the service doesn’t answer. |
| “Too many messages: try again later.” | Too many messages in the hour, or in the minute for the app. |
| “The service is busy: try again in a moment.” | Too many answers at the same time. |
| “The message is too long.” | The request goes over 32,000 characters. |
| “The assistant could not answer. Try again.” | The model didn’t answer. |
LimitsLink to the Limits section
| Limit | Value |
|---|---|
| Where the AI answers | In the preview opened from Moon AI, for the owner and the administrators of the workspace |
| What the assistant reads | Text only |
| A request | 40 messages and 32,000 characters at most |
| An answer | 800 tokens at most |
| Messages | 30 per visitor and per hour at most, you included in the preview; 60 per minute for the app |
| Caps of the app | €5 per 24 hours and €20 per 30 days at the start; up to €100 and €1,000 |
| Shared cap of the workspace | €20 per 24 hours and €100 per 30 days |