- tags
- #help #agents #credits #app-users #wip
- description
- An app role is an AI role, like a coach, that a project's admins make for its app users. App users chat with it from the 💬 bubble and pay for it from their own AI credits.
- brief
- App roles: a project's admins make an AI role (a coach) that only the project's app users get. They talk to it from the 💬 bubble, it answers from the project's own pages, and each answer is paid from their AI credits.
App roles: an AI coach for your app's users
An app role is an AI role that a project's admins make for the project's app users, for example a coach. App users chat with it from the 💬 bubble. It answers from the project's own pages, and each of its answers is paid from the app user's own AI credits.
For app users: talk to the coach
- Tap the 💬 bubble and then Turn on chats. The box says Talk to .
- If you have credits, the coach's chat opens right away. Ask your question.
- If you have no credits, the box shows Talk to : load credits with the credit packs. Pick a pack and tap Load credits to pay by card (Stripe, as on Billing). After you pay, you come back to the same page, with the coach's chat open.
- With chats already on, the bubble opens your coach chat (a new one if you have none open).
- Out of credits during a chat? The coach stops and says so in one line, with a link to Billing where you can load more. Nothing is charged past zero.
- Who reads it? Your chat with the coach is yours, and the project's admins may read it. Other members and app users can't.
- The coach can only read: it sees the pages you may see, and it never changes anything.
What it costs
Each turn is charged to the app user's AI credits: the model's price plus d2's hosted margin. Any AI included in their plan on the project is used first. There is no day cap: their credits are the limit, and their own spend brake still applies. One wallet: credits loaded on one project pay for AI on any project.
For admins: make an app role
Only the project's admins make, change or turn off an app role. Each one has:
- a name (e.g. coach);
- a model, one of d2's hosted models;
- its skill, the project's published
Skill:<name>topic, written by an admin. The role can't be turned on without it.
Turning a role off stops new chats at once. An open chat ends at its next turn, and nothing more is charged. Until the App roles card is on the project's settings page, admins set roles with GET /api/v2/approles and PUT /api/v2/approles/<name> {model, on}.
See also
- Chat: turning chats on, the 💬 bubble.
- Billing: your plan, credits and AI spend: credit packs and the spend brake.
- Hosted AI agents: d2 running your own team's roles.