Aimigo

Commands and AI agents

MCP commands

Every function of the digital human is a named command. How to discover them, call them, and react to their outcomes.

Every function of the digital human — speaking, switching the character, changing the volume, transparency, language, chat — is an MCP command with a name such as aimigo.audio.setVolume. Your web page, the HTML UI in the apps and AI agents all use the same commands, and every command has a minimum role (permissions).

Discover instead of memorising

An AI agent does not need a full list in its prompt. It needs two commands, and finds everything else with them:

CommandInputReturns
aimigo.commands.list{ category?, includeSchema? }every command you may use: name, description, category, usage (one line such as aimigo.audio.setVolume { volume: number (required) }), minRole, keywords; with includeSchema: true also the JSON schema of the input
aimigo.skills.list{}every skill you may use: id, title, summary, keywords

Then:

CommandInputReturns
aimigo.commands.search{ query, limit? (10, max 50), category? }best matches with input schema; words in English or German ("volume", "Lautstärke", "switch character")
aimigo.commands.get{ name }one command with its input schema
aimigo.skills.get{ id }the skill text (Markdown) that teaches one job, e.g. how to build the HTML UI
aimigo.permissions.getCaller{}your role and how many commands and skills you may use

A command you may not use does not appear in lists and searches, and calling it answers PermissionDenied.

Calling a command

From a web page

const dh = Aimigo.default;
await dh.ready;
const volume = await dh.call('aimigo.audio.getVolume', {});
await dh.call('aimigo.audio.setVolume', { volume: 0.6 });
const found  = await dh.call('aimigo.commands.search', { query: 'language' });

Calls from a web page always run with the role User.

From the desktop app (local HTTP)

The Windows app (integration mode) listens on 127.0.0.1:7241, only on the local machine:

EndpointPurpose
GET /mcp/healthis the app running
GET /mcp/tools/listall commands of the caller's role with schemas
POST /mcp/tools/callbody { "tool": "<name>", "input": { … } }
curl -s -X POST http://127.0.0.1:7241/mcp/tools/call -H "Content-Type: application/json" -d "{\"tool\":\"aimigo.commands.search\",\"input\":{\"query\":\"volume\"}}"

Browser pages may call this port only from the origins listed in the app's access policy; all other web sites get 403 OriginNotAllowed, so a web page you visit cannot remote-control the app. A caller can lower its own role with the header X-Aimigo-Role: user (for example to test what an end user sees), never raise it.

From the HTML UI inside the app

Elements of the HTML UI are bound to commands with attributes such as data-mcp-tool="aimigo.audio.setVolume" (see HTML UI). Clicks run with the role User.

Answers

Every call answers once. Over the local HTTP port:

{ "success": true, "data": { "volume": 0.6 } }
{ "success": false, "error": { "code": "PermissionDenied", "message": "…" } }

From a web page the player passes the same answer on as a result message with success, data, error (text) and errorCode (player protocol); dh.call resolves with data or rejects with an Error.

Long operations and events

Commands that start a transition (character, transparency, scene) answer at once:

{ "operation": "started", "status": "loading", "completionEvent": "character" }

The real outcome follows as an event with that name:

dh.on('event', e => {
  if (e.name === 'character') console.log(e.data.success ? 'character ready' : e.data.errorCode);
});
EventRaised byData
characteraimigo.character.set, aimigo.transparency.set { characterId }success, characterId, errorCode?, error?
transparencyaimigo.transparency.setsuccess, enabled, errorCode?, error?
settingssetters of base functions (volume, mute, language, microphone, display mode, …)name, value

Base functions of the app UI

Every function of the app's own interface is available as a command, so an HTML UI or an agent can do everything a user can do by clicking:

FunctionCommands
Volume, muteaimigo.audio.setVolume, aimigo.audio.getVolume, aimigo.audio.setMuted
Fullscreenaimigo.ui.setFullscreen, aimigo.display.getMode
Languageaimigo.settings.getLanguages, aimigo.settings.setLanguage
Microphoneaimigo.settings.getMicrophones, aimigo.settings.setMicrophone, aimigo.chat.startRecording, aimigo.chat.stopRecording
Chataimigo.chat.sendMessage, aimigo.ui.setChatWindow
Character, room, transparencyaimigo.character.list/getCurrent/set, aimigo.scene.list/getCurrent/set, aimigo.transparency.set/getState
Navigationaimigo.camera.setNavigationMode (2D/3D)
Glass look of panelsaimigo.ui.setGlass, aimigo.ui.getGlass
All settings at onceaimigo.settings.getAll

The complete, generated list with roles and inputs: command reference.

Stability

Command names stay stable: changed behaviour gets a new command, and the old name keeps working. Read the input schema with aimigo.commands.get rather than hard-coding it in an agent.

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