First Character

Use the Simple Cat package at apps/runtime-playground/public/demo-character-cw019c-simple-cat/ as a starting point. You can replace its artwork with your own.

1. Create the package layout

my-character/
├── manifest.json
├── character/
│   └── definition.json
└── assets/
    ├── primary.png
    ├── fallback.png
    ├── idle-01.png
    └── ...

The manifest identifies a character package, lists the definition contribution, and declares assets by package-relative path. The definition refers to stable asset IDs rather than arbitrary file paths.

2. Define package and Character identity

The V1 package manifest shape is:

{
  "manifestVersion": 1,
  "id": "example.simple-cat",
  "version": "0.1.0",
  "packageType": "character",
  "contributes": {
    "characters": [
      { "id": "example.simple-cat:cat", "path": "character/definition.json" }
    ]
  },
  "assets": {
    "example.simple-cat:primary": {
      "kind": "image", "mediaType": "image/png", "path": "assets/primary.png"
    }
  }
}

CharacterDefinition.id is separate from manifest.id. Keep package-relative paths inside the package; the loader validates resource references and does not execute package code.

3. Add definition, behavior, and assets

Start from the current V11 Oat Pebble candidate for the latest shape. It demonstrates identity and render anchor, behavior scheduling and action preferences, Personality, Presentation Behavior, V11 repertoire, custom inspect/rest preferences, and Presentation bindings.

Choose:

  1. A unique Character ID and localized name.
  2. A primary neutral image and, where appropriate, fallback.
  3. Which autonomous action kinds the Character supports.
  4. Whether action preferences, Personality, and scheduling values should differ from defaults.
  5. Which semantic presentation phases have authored clips.

Required fields depend on the schema version. See Character Definition, Assets, and Schema Reference.

4. Validate package data

Use Public Content's current projection when reading a V11 package:

import { loadCharacterContentV11 } from "@charaweave/content";
import type { CharacterPackageReaderV1 } from "@charaweave/content";

declare const reader: CharacterPackageReaderV1;
const loaded = await loadCharacterContentV11({
  reader,
  characterId: "example.simple-cat:cat",
});

if (!loaded.ok) {
  console.error("Package validation failed", loaded.issues);
} else {
  console.log(loaded.character.display.name["en-US"]);
}

Implement CharacterPackageReaderV1 with readText(path) and exists(path). It can read a directory, archive or HTTP source.

5. Inspect in Studio

Open Studio Web without installing tools, or run pnpm --filter @charaweave/studio dev from the repository. Follow the illustrated web authoring workflow. The current editable Studio draft projects V10; V11 repertoire inspection uses the selected candidate. Select a package, validate it and compare the settings with the effective policy. Run an action in Runtime Lab. Check its animation, completion, touch reaction and recovery after removing a target. See Studio Guide and Studio Manual.

6. Prepare a Consumer integration

The Host decides what live surfaces exist and maps them to semantic IDs and capabilities. A Browser application then owns DOM attachment, geometry, rendering, execution policy, and cleanup. Continue with Host Integration and the detailed Consumer Integration Manual.