Aimigo

Commands and AI agents

Roles and permissions

Which commands your end users may trigger, and how you as the customer change that.

The roles

RoleWhoTypical commands
Useryour end user: visitor of your web page, person clicking the HTML UI or talking to the digital humanvolume, fullscreen, language, microphone, character, room, transparency, chat
Customeryou and your tools or agentsdesigning the UI, personality, loading texts, screenshots, the user policy, guided processes
AvatarisAimigo's own host integration and toolingnot available to customers or users

The roles are ordered: Customer may do everything User may do. Every command declares the lowest role that may use it (command reference, column Role).

Not permitted means invisible: a command or skill you may not use is missing from aimigo.commands.list, aimigo.commands.search and aimigo.skills.list; aimigo.commands.get answers CommandNotFound, and calling it answers PermissionDenied.

Which role a caller has

Where the call comes fromRole
Your web page (dh.call, the player protocol)User — page scripts are under the visitor's control (developer tools)
HTML UI inside the appUser — a click must not do more than the person clicking may
The digital human's own AI acting for the person it talks toUser
A program on the same computer calling the app's local HTTP portset by the app build: Customer in customer builds
A web page calling the app's local HTTP portUser, and only from origins the access policy lists; all others are rejected

What end users may do: the user policy

As the customer you decide which commands your end users may trigger — through the UI, through the digital human, and from the web page.

  • Take away user commands, for example forbid switching the room: userDeny: ["aimigo.scene.set"].
  • Grant customer commands to users, for example let users restyle the UI: userAllow: ["aimigo.ui.*"].

Patterns:

PatternMatches
aimigo.scene.setexactly this command
aimigo.ui.*every command starting with aimigo.ui.
category:Personalityevery command of a category (categories: see the reference)
skill:html-ui-design-bindingone skill
skill:*every skill

Rules: case does not matter; deny wins over allow; commands reserved for Avataris can never be granted.

Setting it in the app

await call('aimigo.permissions.setUserPolicy', {
  userDeny:  ['aimigo.scene.set', 'category:Personality'],
  userAllow: ['aimigo.ui.setGlass'],
  persist: true            // keep it on this device (default true)
});
await call('aimigo.permissions.getUserPolicy', {});   // shows the effective user commands and skills
await call('aimigo.permissions.setUserPolicy', { reset: true });   // back to the policy shipped with the build

Both commands need the role Customer. getUserPolicy also lists grantableToUsers: the customer commands you may grant.

A customer build can also ship its policy as a file (AccessPolicy.json):

{
  "userAllow": [],
  "userDeny": ["aimigo.scene.set"]
}

On web pages

Your page can always offer less than the policy allows: it simply does not call a command or show a button for it.

Testing what a user sees

  • aimigo.permissions.getCaller {} tells every caller its role and how many commands it may use.
  • On the app's local HTTP port, send X-Aimigo-Role: user to see the app exactly as an end user (a caller can lower its role, never raise it).

This page as Markdown · llms.txt · All docs in one file