Docs / Bots / Avatar sets

Bot avatar sets

A bot on a community can show a face that changes as it works: resting between messages, thinking about its reply, drawing a picture, running a tool, or waiting for an answer. An avatar set is one character drawn in those five states. Any AI model can make one from the prompt the console copies, or a bot that draws can make it for you.

Full spec (Markdown) Bots on your community

The five states

Everyone

A set holds up to five pictures of the same character. A bot shows the one for what it is doing, and idle stands in for any state a set leaves out.

idle
Between messages
thinking
Working out its reply
drawing
Making a picture
working
Running a tool
waiting
Waiting for your answer

Keep one character, the same framing and the same background in every state, so switching from one to the next doesn't jump. States of a bot's own, such as a picture for one tool or for an exit code, are added per bot on the bot's Avatar page; a set holds only these five.

Getting a set onto a community

Everyone

In the community's console open Avatar sets, under Automation. You need the Manage bots permission. The New set card has three ways in:

Copy prompt
Type a Name and a Style, then copy the prompt and paste it into any AI model. With any AI model has what comes back.
Import
Paste a model's JSON answer, or drop its files: pictures, a .zip, or a strip of five panels. The console shows each state as it will play, names anything the relay would refuse, and Add set saves it.
Make
A bot on the community that draws makes the set for you. See A bot draws it.

Add set with nothing imported makes an empty set; upload a picture for each state from the Sets table. Orb, Pixel and Ink are built in, and a community keeps up to 40 more.

Then give it to a bot: in the console, the bot's page › Avatar; in the app, Relay admin › Bots › the bot › Avatar. A bot's own pictures win over its set's.

With any AI model

Everyone

The prompt works pasted into a chat model such as Claude or ChatGPT, or into an image model. It explains the five states and the rules below, and asks for one of two answers:

The prompt's full text is in the spec, section 7. The relay checks every picture as it saves it; if a model's answer breaks a rule, Import says which picture and why.

A bot draws it

Everyone

Make shows on the New set card when a bot on the community makes pictures: it has a picture model of its own, or an --image rule open to everyone. Pick the bot, 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 draws each state from the style instead.
  3. Each picture 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 the Sets table 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.

Pictures

Developers

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.

Animation

Developers

A state is a still picture, or it moves in one of two ways:

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

Files

Developers

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

NameWhat it is
idle.pngThe state's one picture
idle-1.svg, idle-2.svg, …The state's frames, in number order. idle_2.png, idle 2.png and idle02.png are frames too
set.jsonOptional: {"name": "Night owl", "fps": {"idle": 6, "thinking": 12}}
*.json holding a JSON answerThe whole set
*.zipAny of the above, at its top or in one folder
One picture about five times as wide as it is tallA strip: five square panels side by side, in the order idle, thinking, drawing, working, waiting. Import cuts it into five still pictures

Files with other names are left out, and Import says which.

The JSON answer

Developers

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.

{
  "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\">…</svg>",
      "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">…</svg>"
    ]},
    "thinking": {"frames": [
      "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">…</svg>"
    ]}
  }
}
isolink, version
"avatar-set" and 1.
name
1 to 40 characters. Import uses it unless the admin types another.
states
Any of the five states. Each has frames, a list of 1 to 24 pictures, and may have fps, 1 to 30.
A frame
SVG text, or a data: URL of a picture: data:image/png;base64,….

Limits and what the relay says

Developers
LimitValue
Sets a community keeps, not counting built-in ones40
Set name1 to 40 characters
One picture256 KB
Frames a state1 to 24
A state's frames together2 MB
Frames a second1 to 30, 8 when not given
TypesPNG, JPEG, GIF, WebP, SVG
The relay saysWhy
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.

If the relay and this page ever disagree, the relay wins, and it says why it refused a picture. The console asks with adminAvatarSetMake (bot, state, style, and idle as base64 for the other states), which answers {picture, mime}; Add set sends ai, the bot's id, with the new set's name.