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.
The five states
EveryoneA 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.
idleBetween messages
thinkingWorking out its reply
drawingMaking a picture
workingRunning a tool
waitingWaiting 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
EveryoneIn 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
EveryoneThe 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:
- A model that writes code answers with one JSON code block of SVG frames (The JSON answer). Paste the whole answer into Import.
- A model that makes pictures makes one strip, 1280 × 256 pixels, five square panels side by side in the order idle, thinking, drawing, working, waiting, or five square pictures named
idle.png,thinking.pngand so on. Drop them on Import; a strip is cut into its five states.
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
EveryoneMake 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.
idleis drawn from the style.- 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. - 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.
- ↻ 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- 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 × 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 × 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.
Animation
DevelopersA state is a still picture, or it moves in one of two ways:
- 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.
Files
DevelopersImport 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. idle_2.png, idle 2.png and idle02.png are frames too |
set.json | Optional: {"name": "Night owl", "fps": {"idle": 6, "thinking": 12}} |
*.json holding a JSON answer | 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 |
Files with other names are left out, and Import says which.
The JSON answer
DevelopersA 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"and1.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 havefps, 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| Limit | Value |
|---|---|
| Sets a community 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. |
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.