# Quickstart: a digital human on your page in 10 minutes

> Exact steps, with a check after each one. Works on any web page you can edit: plain HTML, WordPress, Webflow, React, Vue.

> [!TIP]
> **For AI agents.** Do the steps in order. Copy the code exactly. After each step run the check. If a check fails, go to [troubleshooting](https://aimigo.live/docs/troubleshooting.md) and do not improvise another integration.

## What you need

- A web page you can edit, served over **https** (or `http://localhost` while you test).
- Nothing else: no account, no key, no build tool, no server change. The digital human runs in its own frame from the Aimigo player host.

## Step 1 — add the script tag

Put this line right before `</body>` of your page:

```html
<script src="https://player.aimigo.live/embed/aimigo-embed.js" data-character="Ben" data-mode="transparent" data-position="bottom-right"></script>
```

That is all for the basic integration. The script creates a transparent frame in the bottom-right corner, loads the player and the character **Ben**, and never blocks clicks on your page.

**Check:** reload the page. After a few seconds (first visit: longer, the player downloads once) Ben stands in the bottom-right corner on a transparent background. In the browser's developer tools, `Aimigo.version` returns a version string such as `"1.0.0"`.

> [!NOTE]
> Site builders: in WordPress use a "Custom HTML" block or a footer-script plugin, in Webflow *Project settings → Custom code → Footer code*, in React/Vue put the tag into `index.html` (not into a component that renders repeatedly).

## Step 2 — wait until the digital human is ready

Every command must wait for `ready`. Add this script after the tag from step 1 (as a separate file if your page has a Content Security Policy without inline scripts):

```html
<script>
  window.addEventListener('DOMContentLoaded', async () => {
    const dh = Aimigo.default;          // created by the script tag
    await dh.ready;                     // player loaded, character on stage, commands accepted
    console.log('Aimigo ready');
  });
</script>
```

**Check:** the console shows `Aimigo ready`. If `dh.ready` rejects, the error message says why (see [troubleshooting](https://aimigo.live/docs/troubleshooting.md)).

## Step 3 — let it speak

The digital human speaks audio that you provide (for example from your text-to-speech service). It moves its lips to the audio.

```js
await dh.speak({ audioUrl: '/audio/welcome.mp3' });
```

- `audioUrl` can be any MP3, WAV or OGG file the page can read: same origin as your page, or another origin that allows CORS.
- Optional `wordTimestamps` improve lip sync and subtitles: `[{ word: 'Hello', startTime: 0.0, endTime: 0.42 }, …]` (seconds).

**Check:** Ben speaks the file with moving lips. `await dh.speak(...)` resolves when playback was accepted.

> [!WARNING]
> Browsers block sound until the visitor has interacted with the page (a click or a key press). Call `speak` after a click, for example from a "Talk to Ben" button. Before the first interaction the audio may stay silent.

## Step 4 — choose character and mode (optional)

```js
await dh.setCharacter('Viki');                // another character
await dh.setMode('room', '<sceneId>');        // a 3D room instead of the transparent stage
await dh.setMode('transparent');              // back to transparent
```

`await dh.call('aimigo.character.list', {})` and `await dh.call('aimigo.scene.list', {})` list the available characters and rooms.

**Check:** the promise resolves; the change itself finishes a moment later and is reported as an event (`dh.on('event', e => console.log(e))` shows `name: "character"` or `"transparency"` with `success: true`).

## Step 5 — greet contacts by name (coming soon)

With personal links, the digital human will greet each contact from your Google Sheet by name. This function is not available yet; the setup will be described here as soon as it is.

## Complete example

```html
<!doctype html>
<html lang="en">
<head><meta charset="utf-8"><title>Aimigo test</title></head>
<body>
  <h1>My page</h1>
  <button id="talk">Talk to Ben</button>

  <script src="https://player.aimigo.live/embed/aimigo-embed.js" data-character="Ben" data-mode="transparent" data-position="bottom-right"></script>
  <script>
    document.getElementById('talk').addEventListener('click', async () => {
      const dh = Aimigo.default;
      await dh.ready;
      await dh.speak({ audioUrl: '/audio/welcome.mp3' });
    });
    Aimigo.default.on('event', e => console.log('Aimigo event', e));
  </script>
</body>
</html>
```

## Done — what next

- All attributes and functions: [Embed and JavaScript API](https://aimigo.live/docs/embed.md).
- Every command the digital human understands: [command reference](https://aimigo.live/docs/mcp-reference.md).
- Your page has a Content Security Policy, or runs inside a frame: [host page requirements](https://aimigo.live/docs/hosting.md).
