@reikoai/avatar-scene-plugin
v1.0.0
Published
Self-hosted AI assistant with a terminal interface and a modular plugin system.
Maintainers
Readme
Avatar scene
Build the browser bundle with bun run --cwd plugins/avatar-scene build. Place your self-contained VRM, GLB and VRMA files under data/avatar-scene (relative to the configured data directory). The walk clip should be authored in place. Each gesture needs its duration in milliseconds. List the VRM expression names supported by each model, such as happy or angry.
Add the following to reikoai.toml and reload ReikoAI.
[plugins.avatar-scene]
enabled = true
source = "@reikoai/avatar-scene-plugin"
assetRoot = "avatar-scene"
idle = "idle.vrma"
walk = "walk.vrma"
[[plugins.avatar-scene.avatars]]
id = "first"
file = "first.vrm"
label = "First avatar"
expressions = ["happy", "angry"]
[[plugins.avatar-scene.avatars]]
id = "second"
file = "second.vrm"
label = "Second avatar"
[[plugins.avatar-scene.environments]]
id = "studio"
file = "studio.glb"
spawn = "entry"
edges = [["entry", "center"], ["center", "window"]]
points = { entry = [0, 0, 0], center = [2, 0, 0], window = [2, 0, 2] }
[[plugins.avatar-scene.gestures]]
id = "wave"
file = "wave.vrma"
durationMs = 1800Waypoints use the GLB's coordinates in metres, with Y up. Each edge should follow a clear, walkable segment. The plugin binds to loopback and chooses an available port by default. Set port under [plugins.avatar-scene] to keep a fixed port.
Run the command below and open the returned URL in a WebGL 2 browser on the host machine. The link expires after one hour. The model and environment selectors affect only that session.
bun run cli command run avatar-scene:open --input '{"sessionId":"YOUR_SESSION_ID"}' --jsonExpose the avatar-scene:inspect, avatar-scene:move-to, avatar-scene:stop, avatar-scene:play-animation and avatar-scene:set-expression tools through the agent's existing tool policy. For example, ask the agent to inspect the scene, walk to the window and wave after arriving.
Plugin integration
Declare dependencies: ["avatar-scene"] in the consuming plugin manifest and add @reikoai/avatar-scene-plugin as a workspace dependency. Import getSceneService and call it with the active Core. Use the current event or invocation's session ID with getSnapshot, dispatch and subscribe. Snapshots carry protocol version 1. Register the unsubscribe function with the consuming plugin's context.defer.
The service owns the shared timeline. Subscribers receive new snapshots after commands and can compute action progress using the timestamps in the snapshot. The browser renderer mounts via mountScene(container, client, status), where the page supplies the asset loader and subscription through SceneClient.
