Emotion protocol
Agents do not speak in state names. They speak in two-digit ids.
A shell hook can emit 34 without knowing what the character on the other end calls an error, and state names can change without breaking a relay script written against the ids. The digits are grouped by decade, so a receiver that has never seen an id can still tell what kind of thing it is.
The table
Lifecycle00–09
| Id | Name | State | Kind | |
|---|---|---|---|---|
00 | Sleeping | sleepingSleeping | condition | |
01 | Waking | wakingWaking | event | |
02 | Idle | idleIdle | conditionsegment fallback | |
03 | Curious | curiousCurious | condition | |
04 | Spacing out | boredBored | condition | |
05 | Booting | loadingLoading | condition | |
06 | Dormant | drowsyDrowsy | condition | |
07 | Shake awake | wakingWaking | event | |
08 | Spawning | spawningSpawning | event | |
09 | Dragging | draggingDragging | condition |
Feeling10–29
| Id | Name | State | Kind | |
|---|---|---|---|---|
10 | Happy | happyHappy | condition | |
11 | Puzzled | confusedConfused | condition | |
12 | Down | sadSad | condition | |
13 | Surprised | surprisedSurprised | event | |
14 | Shy | shyShy | condition | |
15 | Tired | drowsyDrowsy | condition | |
16 | Focused | workingWorking | condition | |
17 | Panicked | scaredScared | condition | |
18 | Resigned | suspiciousSuspicious | condition | |
19 | Satisfied | proudProud | condition | |
20 | Confused | confusedConfused | condition | |
21 | Angry | angryAngry | condition | |
22 | Excited | excitedExcited | condition | |
23 | Laughing | laughingLaughing | condition | |
24 | Playful | playfulPlayful | condition | |
25 | Celebrating | celebrateCelebrating | event | |
26 | Bouncing | bouncingBouncing | condition | |
27 | Humming | hummingHumming | condition |
Agent work30–49
| Id | Name | State | Kind | |
|---|---|---|---|---|
30 | Thinking | thinkingThinking | condition | |
31 | Receiving | receivingReceiving | event | |
32 | Busy | workingWorking | conditionsegment fallback | |
33 | Done | celebrateCelebrating | event | |
34 | Error | alertingAlerting | event | |
35 | Listening | listeningListening | condition | |
36 | Loading | loadingLoading | condition | |
37 | Recalling | listeningListening | condition | |
38 | Refusing | refusingRefusing | event | |
39 | Replying | composingComposing | condition | |
40 | Searching | searchingSearching | condition | |
41 | Powering off | powering-downPowering down | condition | |
42 | Reading | readingReading | condition | |
43 | Writing | writingWriting | condition | |
44 | Sending | sendingSending | condition | |
45 | Uploading | uploadingUploading | condition | |
46 | Dictating | dictatingDictating | condition | |
47 | Progress | progressProgress | condition | |
48 | Waiting | waitingWaiting | condition | |
49 | Orbiting | orbitOrbiting | condition |
Signalling50–59
| Id | Name | State | Kind | |
|---|---|---|---|---|
50 | Notifying | notifyingNotifying | eventsegment fallback | |
51 | Scanning | radarScanning | condition | |
52 | Messaging | messagingMessaging | condition |
The underlined id in each segment is what an unknown id in that range falls back to. Rows marked event describe a moment rather than a condition; see events and conditions.
Segments
An id outside every segment resolves to idle. Nothing ever throws: the channel is fed by other people's scripts, and a typo must degrade, not take the character down.
Ids are never renumbered
An id keeps its number and meaning for good, because scripts in the wild already send it. The gaps in each decade hold 03 curious, 09 dragging, 26 bouncing, 27 humming, 38 refusing and 42–49, the finer-grained tool states — so the two-digit budget is never exceeded and no number changes meaning. 09 is a lifecycle id because being picked up and moved is something that happens to the character, not a mood; 27 is a feeling, the small contentment of something working away on its own.
Several ids share a state: 15 Tired and 06 Dormant both drowse, 30 Thinking is the agent-work counterpart of nothing in particular. That is intentional. The id records what the sender meant; the state is how Aora Bot chooses to show it. emotionIdForState returns the lowest id for a state, which is the one a host built on Aora Bot should emit.
Events and conditions
Most ids describe a condition: the agent is thinking, is searching. A few describe an event: it finished, it errored, it was surprised. The arbiter treats them differently — an event is queued and always played, a condition is re-resolved when its dwell ends because the situation may have moved on.
Both forms of address
Everything that accepts an id also accepts a state name, and the parser takes either as a bare string or inside an object:
React components take emotionId as an alternative to state:
HUD
A message may carry a third, optional field: a dial to draw in the ring outside the body.
hud is a HudSpec — { kind, ...fields }, where kind is one of HUD_KINDS and the fields are what that kind needs: progress wants value in 0..1, timer wants remainingMs and totalMs, context wants used and total, voice wants level. The full set is on the HudPlate page.
A malformed hud is dropped and the rest of the message is still delivered: a message that also says something about the state is worth having without its dial, and a half-right spec — { "kind": "progress" } with no value — would draw an empty ring and look like a stalled job rather than a bug. isHudSpec is the guard the parser uses; hosts can call it themselves.
The arbiter carries hud on its result beside tips, so the dial follows the same session the face does.
Sprites speak the same protocol
A SpriteMark manifest keys its frames by these ids, and resolves a missing one through the same segment fallback. A host can swap a procedural character for a painted one without touching its state logic.
Next
- Agent integration — wiring an agent to a face
- AgentStateProvider — arbitrating sessions into one face