Build expression
Pixling is preparing for Mac App Store release. Join the waitlist on pixling.app to hear when it launches.
Pixling does not decide what “working”, “waiting”, or “done” look like. You choose, per resident, from the motions and settings it reports. The examples below target client:my-agent/conversation-1, the resident bound in Give your agent a resident.
Choose the right channel
Section titled “Choose the right channel”| Channel | Best for | Persists? | Key requirement |
|---|---|---|---|
Message / Question (message.send, question.ask) |
Updates, saved letters, and choices | Kept in conversation until stowed | Needs visible or queued bubble (refused on wallpaper) |
Status (resident.status, status.define) |
Ongoing mode (loading, waiting) |
Temporary (10 min default; definitions saved) | Requires motionEnabled: true (newly ensured residents start stopped) |
One-off signal (emote, bounce, glow, throw) |
Quick visual reaction or physical nudge | Forgotten on finish (throw saves landing spot) |
Skips when hidden or on wallpaper |
Sequence (sequence.start) |
Choreographed multi-step timing, cuts, speech, light | commit: restore reverts; onSuccess saves |
Max 32 steps (128 expanded), 30 s total |
pixling resident set --to client:my-agent/conversation-1 --motion truepixling resident emote --to client:my-agent/conversation-1 --text "♪"Say something
Section titled “Say something”{ "to": "client:my-agent/conversation-1", "text": "Tests pass. Opening the PR.", "author": "My Agent"}pixling_message_send returns a receipt with an outcome:
outcome |
Meaning |
|---|---|
spoke |
In the visible part of the resident’s window when accepted. |
queued |
Accepted, not yet seen (below scroll, or waiting on keyboard or VoiceOver focus). Do not resend. |
held |
Kept until the resident can show it; heldBecause says why. |
notVisible, notOnDesk, and rejected explain why a message was not shown; see receipts.
- History stays until trimmed: Every message stays in the window, oldest at the top, and nothing expires on a timer. The window keeps the newest 200 cards, letters included.
- Mark important reports as letters: Add
"keep": truefor a report the user should find later; it becomes a letter marked✉in the window. - Accepted is not read: A receipt confirms acceptance, not that someone read it.
waitingcounts unseen messages and letters ahead of this one (excluding this message and questions).
{ "to": "client:my-agent/conversation-1", "requestID": "deploy-1", "question": "Deploy to staging now?", "choices": [ {"id": "yes", "label": "Deploy"}, {"id": "later", "label": "Not now"} ]}pixling_question_ask shows a card with 2–6 choices plus a row where the user can type their own answer, and waits for the reply.
- On timeout: Returns
pendingwith apromptID. Wait again usingpixling_question_resultwith thatpromptID. - Answered while nobody is waiting: For a bound resident, the answer goes to its inbox as
kind: answer. Otherwise it waits for the nextpixling_question_result.
Limits and every field: Messages and questions.
Show a state
Section titled “Show a state”{ "to": "client:my-agent/conversation-1", "name": "loading", "hold": {"animation": "sequence:typing"}}{ "to": "client:my-agent/conversation-1", "name": "loading"}Define each state name once per asset with pixling_status_define: enter plays a saved sequence once on start, and hold sets the idle motion or pose that stays. Activate it with pixling_resident_status without saving anything, and resend the call to extend it. You can also pass animation or pose directly instead of name.
- Attach to messages or questions:
message.sendandquestion.askalso accept"status": "<name>". A question’s state lasts while the question is open and restores the previous state when it ends. - Automatic cleanup: A new call replaces the state;
clearor expiry (10 minutes by default) restores the resident’s usual look. - When a state yields: An undefined name shows nothing (
yieldsTo: unbound) until you define it. If the user pinned a pose or turned Motion off, nothing changes andyieldsTonames why.
See status.
Give a one-off signal
Section titled “Give a one-off signal”{ "to": "client:my-agent/conversation-1", "select": "all", "shape": "pulse", "durationMs": 800}{ "to": "client:my-agent/conversation-1", "text": "♪"}{ "to": "client:my-agent/conversation-1", "strength": 0.6, "direction": "down"}pixling_resident_glowlights the resident once (Light (glow)).pixling_resident_emotepops a short emote above it (Emotes).pixling_resident_bouncesquashes its body against a side and springs it back, like hitting a wall (Bounce).
Every one-off signal is forgotten as soon as it finishes.
Plan motion
Section titled “Plan motion”{ "schemaVersion": 2, "requestID": "greeting-1", "to": "client:my-agent/conversation-1", "commit": "restore", "dryRun": true, "steps": [ { "kind": "repeat", "times": 2, "steps": [ { "kind": "cut", "holdMs": 1200, "say": {"text": "Hello", "author": "My Agent"}, "glow": [{"select": "all", "shape": "pulse", "durationMs": 334}] } ] } ]}Send the whole plan at once and let Pixling keep time. The plan above says hello and pulses twice, totaling 2400 ms.
- Inspect the body first: Call
pixling_resident_describewith"sections":["sequence"]for available motions, frame counts, and color groups, andpixling_resident_sketchfor an ASCII sketch. - Validate before playing:
dryRun: truevalidates the plan without running it; resend withdryRun: falseto play. Withcommit: restore, the resident returns to its starting state when the sequence ends or is canceled. - Plan limits: Up to 32 steps (128 after
repeat), at most 30 seconds total, and at most 10 seconds per cut. See Sequences.
Target several residents
Section titled “Target several residents”Pass an array of 1–32 selectors in to:
{ "to": ["client:my-agent/moku", "client:my-agent/piko"], "text": "Check finished", "author": "My Agent"}- All-or-nothing lookup: Every selector resolves before anything sends; if any selector is invalid or missing, nobody receives the message.
- Per-resident bindings: Each resident enforces its own binding, so a resident you cannot write to gets a
rejectedreceipt. - Check every outcome:
summarycounts outcomes across targets; inspectreceiptsfor each resident. - Disallowed selectors:
autoandeveryonecannot appear inside an array.
Full rules: several targets.
Restore exact size and position
Section titled “Restore exact size and position”Before resizing a resident, read its scale from pixling_resident_describe with "sections":["resident"], then pass it back to pixling_resident_place:
{"to": "client:my-agent/conversation-1", "scale": 2.5396825396825395}- Use
scale, notsize:sizesnaps to the pixel grid (asking forsize: 160again can produce157.5), whilescaleis applied as read. - Position and direction: Restore position from
footprint.xandfootprint.y, and facing direction frommirrored. - Display changes: If the screen changed in between, identical size and position are not guaranteed.
Details: restoring an exact size.