# Isolink avatar set spec (for people, scripts and AI models)

An **avatar set** is one character drawn in the five states a relay bot can be in. A relay keeps avatar sets; any of its bots can start from one, and a bot's own pictures win over its set's. Orb, Pixel and Ink are built in. This document is the complete format of a set, so a person, a script or an AI model can make one that a relay takes.

The relay checks every picture as it saves it. If the relay and this document ever disagree, the relay wins, and it says why it refused a picture (section 8).

**If you are an AI model asked to make an Isolink avatar set, read sections 2 to 6, then answer as section 6 says.** Section 7 is the prompt the console copies, which says the same in short.

## Contents

1. Getting a set onto a relay
2. The states
3. Pictures
4. Animation
5. Files
6. The JSON answer
7. Prompt template
8. Limits and what the relay says
9. Make: a bot draws the set

## 1. Getting a set onto a relay

In the relay console open **Avatar sets** (under Automation). You need the Manage bots permission.

- **Copy prompt**: type a **Name** and a **Style** under New set, then Copy prompt. Paste it into any AI model: a chat model such as Claude or ChatGPT, or an image model.
- **Import**: paste the model's answer (section 6), or drop or pick its files (section 5): pictures, a `.zip`, or a five-panel strip. The console shows each state as it will play, names anything the relay would refuse, and **Add set** saves it.
- **Make**: a bot that draws makes the set for you (section 9).
- **Add set** with no import makes an empty set; then upload a picture for each state from the Sets table.

Then pick the set for a bot: in the console, the bot's page › Avatar; in the app, Relay admin › Bots › the bot › Avatar.

## 2. The states

| State | When a bot shows it | What to draw |
| --- | --- | --- |
| `idle` | Between messages, and in place of any state a set leaves out | Resting. A calm loop: breathing, blinking |
| `thinking` | Working out its reply | Looking up, a thought, dots going round |
| `drawing` | Making a picture (`make_image`) | A pencil or brush at work |
| `working` | Running a tool or a program | Gears, typing, something turning |
| `waiting` | Waiting for the person to answer a question it asked (`ask_choice`, `ask_text`, `share_picture`) | Looking at the viewer, an hourglass, tapping |

Only `idle` matters most: every state a set leaves out shows `idle`. A set holds no other states; states of a bot's own (a tool, a reply or an exit code) are added per bot, on the bot's Avatar.

Keep one character, the same framing and the same background in every state, so switching from one to the next doesn't jump.

## 3. Pictures

- **Square and full-bleed.** Fill the whole square with the background. Apps crop every picture to the bot's shape (a circle, a flower, a squircle and others), so the corners are cut off and transparent edges show the app behind them.
- **Small.** Apps show the avatar from 26 to 132 pixels wide. Keep the character big and simple, inside the middle 70% (a circle of radius 35 in a 100 x 100 square). Thin lines and small details disappear.
- **No words, letters or numbers.**
- **Types**: PNG, JPEG, GIF, WebP or SVG. The relay knows each by its first bytes, not its name.
- **Size**: 256 x 256 pixels is right for PNG, JPEG, GIF and WebP. SVG uses `viewBox="0 0 100 100"`.
- **Each file is up to 256 KB.**

SVG is drawn once into a still picture, so:

- use only shapes, paths, gradients, groups and transforms;
- no `<script>`, `<style>`, `<text>`, `<image>`, `<foreignObject>`, links to anything outside the file, or animation tags (`<animate>` and CSS animations don't play).

## 4. Animation

A state is a still picture, or it moves:

- **Frames**: 1 to 24 pictures shown one after another in a loop, at 1 to 30 frames a second (8 when not given). A state's frames are up to 2 MB together.
- **An animated GIF or WebP** as the state's one picture.

Short loops read best: 2 to 12 frames. Make the last frame lead back into the first.

## 5. Files

Import reads files by their names. Case doesn't matter.

| Name | What it is |
| --- | --- |
| `idle.png` | The state's one picture |
| `idle-1.svg`, `idle-2.svg`, … | The state's frames, in number order |
| `set.json` | Optional: `{"name": "Night owl", "fps": {"idle": 6, "thinking": 12}}` |
| `*.json` holding a JSON answer (section 6) | The whole set |
| `*.zip` | Any of the above, at its top or in one folder |
| One picture about five times as wide as it is tall | A **strip**: five square panels side by side, in the order idle, thinking, drawing, working, waiting. Import cuts it into five still pictures |

`idle_2.png`, `idle 2.png` and `idle02.png` are frames too. Files with other names are left out, and Import says which.

## 6. The JSON answer

A chat model that can't make files answers with one JSON object. Import takes it pasted, in a code block or not, or as a `.json` file.

```json
{
  "isolink": "avatar-set",
  "version": 1,
  "name": "Night owl",
  "states": {
    "idle": {"fps": 2, "frames": [
      "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><rect width=\"100\" height=\"100\" fill=\"#22305a\"/><circle cx=\"50\" cy=\"56\" r=\"26\" fill=\"#d9b48a\"/><circle cx=\"41\" cy=\"50\" r=\"7\" fill=\"#ffb547\"/><circle cx=\"59\" cy=\"50\" r=\"7\" fill=\"#ffb547\"/></svg>",
      "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><rect width=\"100\" height=\"100\" fill=\"#22305a\"/><circle cx=\"50\" cy=\"56\" r=\"26\" fill=\"#d9b48a\"/><path d=\"M35 50h12M53 50h12\" stroke=\"#3b2a12\" stroke-width=\"3\"/></svg>"
    ]},
    "thinking": {"frames": [
      "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><rect width=\"100\" height=\"100\" fill=\"#22305a\"/><circle cx=\"50\" cy=\"56\" r=\"26\" fill=\"#d9b48a\"/><circle cx=\"43\" cy=\"47\" r=\"7\" fill=\"#ffb547\"/><circle cx=\"61\" cy=\"47\" r=\"7\" fill=\"#ffb547\"/><circle cx=\"78\" cy=\"20\" r=\"4\" fill=\"#eaf1fb\"/></svg>"
    ]}
  }
}
```

- `isolink` is `"avatar-set"` and `version` is `1`.
- `name` is 1 to 40 characters. Import uses it unless the admin types another.
- `states` has any of the five states (section 2). Each has `frames`, a list of 1 to 24 pictures, and may have `fps`, 1 to 30.
- A frame is SVG text (section 3), or a `data:` URL of a picture: `data:image/png;base64,…`.

## 7. Prompt template

This is what **Copy prompt** puts on the clipboard, with `{name}` and `{style}` filled in. It works pasted into any model.

```text
Make an avatar set for a bot on an Isolink relay.

Name: {name}
Style: {style}

A set is one character shown in five states:
- idle: resting, between messages. A calm loop: breathing, blinking.
- thinking: working out its reply.
- drawing: making a picture.
- working: running a tool or a program.
- waiting: waiting for the person to answer a question.

Every picture is square and full-bleed: fill the whole square with the background, with no transparent edges. Apps crop it to a circle or another shape and show it from 26 to 132 pixels wide, so keep the character big, simple and inside the middle 70%. No words, letters or numbers. Keep the character, framing and background the same in every state, so switching between them doesn't jump.

Answer in one of these two ways.

1. If you write code or text, answer with one JSON code block and nothing else:
{"isolink": "avatar-set", "version": 1, "name": "{name}", "states": {
  "idle": {"fps": 8, "frames": ["<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">...</svg>", "..."]},
  "thinking": {"fps": 8, "frames": ["..."]},
  "drawing": {"fps": 8, "frames": ["..."]},
  "working": {"fps": 8, "frames": ["..."]},
  "waiting": {"fps": 8, "frames": ["..."]}
}}
Each frame is a complete SVG with viewBox="0 0 100 100". Use only shapes, paths, gradients and groups: no <script>, <style>, <text>, <image>, <foreignObject>, links or animation tags. Animate by giving a state several frames that loop: 1 to 24 frames, at 1 to 30 frames a second. One frame is a still picture.

2. If you make pictures, make one image 1280 x 256 pixels: five square panels side by side with no gaps or borders, in this order: idle, thinking, drawing, working, waiting. Or make five square pictures named idle.png, thinking.png, drawing.png, working.png and waiting.png.

Limits: PNG, JPEG, GIF, WebP or SVG. Each file is up to 256 KB, and a state's frames are up to 2 MB together.
```

## 8. Limits and what the relay says

| Limit | Value |
| --- | --- |
| Sets a relay keeps, not counting built-in ones | 40 |
| Set name | 1 to 40 characters |
| One picture | 256 KB |
| Frames a state | 1 to 24 |
| A state's frames together | 2 MB |
| Frames a second | 1 to 30, 8 when not given |
| Types | PNG, JPEG, GIF, WebP, SVG |

| The relay says | Why |
| --- | --- |
| A picture is up to 256 KB. | One file is too big. Make it smaller: fewer colours, or 256 px a side. |
| Use a PNG, JPEG, GIF, WebP or SVG picture. | The file is something else, or an SVG with no `<svg>` in it. |
| Send 1 to 24 pictures. | A state has no frames, or more than 24. |
| The pictures are up to 2 MB together. | A state's frames are too big together. |
| A picture is damaged. | A frame isn't a picture: in JSON, a `data:` URL that isn't base64. |

## 9. Make: a bot draws the set

**Make** shows on the New set card when a bot on the relay makes pictures (it has a picture model of its own, or an `--image` rule open to everyone). Pick the bot and say what the set looks like, then Make:

1. `idle` is drawn from the style.
2. Each other state is drawn as a change to `idle`, so it is the same character in the same frame. A model that can only draw from words (DALL·E 3) draws each from the style instead.
3. Pictures are drawn at the quickest quality, several at once; each is cut to its middle square, at most 256 pixels a side, and fills its place as it comes back. **Stop** keeps what is done.
4. ↻ on a state draws just that one again. **Add set** saves it, and Sets shows it with an AI tag.

The pictures are stills. Each counts toward the bot's usage and the admin's limits on it, as a picture in a chat does, and the bot's instructions apply.

In the app, Make is with the sets on a bot's Avatar (Relay admin › Bots › the bot › Avatar). It draws in **Describe** (a style) or **Persona** (the look comes from the bot's name and its instructions, which the admin can change first), and with a bot whose model can change a picture it draws **Frames**: 1, 4 or 8 a state. Each state's first picture comes as above; each other frame is a small change to it, the next moment of a loop. **Use** puts the pictures on the bot as its own, and **Save set** keeps them as an AI set too and picks it for the bot.

The console and the app ask with `adminAvatarSetMake` (`bot`, `state`, `style` or `persona` (a bot's id, with `told` in place of its instructions), and `idle` as base64 for the other states; for a frame, `base` (the state's first picture), `frame` (from 2) and `frames`), which answers `{picture, mime}`; Add set sends `ai` (the bot's id) with the new set's name. `adminBots` marks a bot whose model can change a picture with `redraws`.
