ODDSPRIG 2D ASSET STUDIO — WEBPAGE AI CONTROLS On the webpage, select the matching400MB or1GB Sprout profile. The app automatically reads its small instruction TXT file and passes MODEL PROMPT to Sprout. Start loads the model only after explicit opt-in. Optional automatic command application creates editable pixels with Undo. Browser-agent API: window.OddsprigAI.getInstructions(profile,task), inspect(), draw(commandText,revision), animate(commandText,revision), getAnimationState(), exportProject(), preview(). task is draw or animate. The CLI and localhost HTTP service described below apply to the desktop package. They are not public server endpoints on oddsprig.com. ODDSPRIG 2D ASSET STUDIO 0.006 — LOCAL AI CONTROL WHAT IS REAL This app has a deterministic code drawing engine, a command-line runner, and an optional HTTP control backend bound to 127.0.0.1. They run on this computer. The code tools need no model, account, remote API or image generator. The optional website Sprout loads its browser model only after its explicit Start action. An AI writes short text instructions; the studio draws actual editable pixels and frames. The human can keep drawing on the result in the same editor. FILES SPROUT-QUICKSTART.txt Tiny model prompt and first example. AI-TOOLS.json Drawing, animation, instruction and preview tools. ai/studio.cjs Executable CLI and tool-call adapter (Node.js). ai/backend.cjs Local HTTP server, revision checks, project persistence. js/asset-commands.js Same drawing engine used in the browser and backend. examples/copperbot.draw Complete animated robot drawing commands. examples/copperbot.cas.json Generated editable example project. HAND-DRAWING-CAPABILITIES.txt Beginner, Intermediate and Professional controls. START WITHOUT A SERVER Open the usual desktop launcher. Choose AI / Code. Paste commands or open a .draw file, then Apply commands. It is one undoable change. canvas resets the document explicitly; leave that line out when editing an existing drawing. Open project files with Open. Do not replace a person's existing artwork unless they requested it; save a copy first. AUTOMATED FILE WORKFLOW (PowerShell, from the desktop program folder) The installed Node executable is currently: node No additional packages are needed. Use the existing Node installation. node .\app\ai\studio.cjs run .\app\examples\copperbot.draw --out .\Projects\MyRobot.cas.json --png .\Projects\MyRobot.png node .\app\ai\studio.cjs inspect .\Projects\MyRobot.cas.json --ascii For subsequent edits write another .draw file without canvas, then use run --input .\Projects\MyRobot.cas.json --out .\Projects\MyRobot-v2.cas.json. Output files are not overwritten unless --force is explicitly supplied. Use preview PROJECT --out FILE.png --frame 1 to inspect a chosen frame. The headless PNG/ASCII renderer supports pixel projects, layer transforms and styles. For imported SVG artwork use the browser's Export, which renders the complete SVG. Headless preview rejects it rather than silently omitting it. LIVE BACKEND Start AI Studio.cmd in the desktop program folder. This opens another local studio session. The existing drawing window and its browser recovery remain untouched. Close neither to make room for a test. The session address is local. An AI can also run: node .\app\ai\studio.cjs serve --workspace '.\AI Workspace' The --open option opens the editor when the human requests it. The session writes AI Workspace\control.json (local address/session token), workspace.cas.json (current project), and previous.cas.json (previous disk state). Treat control.json as private connection information, not model prompt material. The CLI reads it for the AI. Keep user project exports. node .\app\ai\studio.cjs state node .\app\ai\studio.cjs send .\changes.draw --revision 0 node .\app\ai\studio.cjs preview-live --out .\Projects\preview.png node .\app\ai\studio.cjs pull --out .\Projects\AI-result.cas.json node .\app\ai\studio.cjs stop state returns a compact summary and revision, not huge RGBA arrays or SVG. send applies the entire batch or none of it. A stale revision is rejected. Inspect again and decide on the new state before retrying; do not blindly reapply a change. --session PATH selects another control.json explicitly. In the editor, AI / Code shows Local AI session. Load AI workspace imports the AI's result with Undo available. Send current artwork gives the backend your current document. Nothing automatically replaces a human's drawing. The backend's current selection is retained between batches. Browser and backend are separate until one of those explicit exchange buttons is used. SMALL MODEL TOOL ADAPTER Your host can register AI-TOOLS.json if the model supports tools. Dispatch its tool call to studio.cjs tool using standard input. The adapter runs the actual local API; these are not imaginary function names. Input: {"name":"inspect_asset","arguments":{}} Input: {"name":"draw_asset","arguments":{"revision":0,"commands":"color #af7850\nrect 4 4 8 8"}} Input: {"name":"preview_asset","arguments":{}} Output is compact JSON. preview_asset saves a PNG and returns a sampled text color map, so a text-only model has feedback. The PNG is the exact pixel view; the map is only a coarse sample. Do not send the connection token to a model. A plain text model can instead write .draw files; function calling is optional. HTTP CONTRACT (adapter handles authentication) All API routes require Authorization: Bearer . GET /api/state compact summary + revision + selection GET /api/project complete packed editable project (only when needed) GET /api/help command grammar GET /api/preview.png selected frame; ?frame=1 chooses a frame POST /api/commands {expectedRevision:N,commands:"one command per line"} POST /api/project {expectedRevision:N,project:packedProject} POST /api/stop {} No arbitrary JavaScript, shell command, filesystem path or network request is accepted as a drawing command. The optional backend has no model API keys. BROWSER CODE API (same drawing engine) window.OddsprigAI.inspect() window.OddsprigAI.draw('color #ffcc77\npixel 12 12', inspectedRevision) window.OddsprigAI.exportProject() window.OddsprigAI.preview() This API exists only inside the editor. Use the CLI/HTTP adapter for an AI process rather than relying on developer-tools or mouse automation. COMMANDS Coordinates are pixels from top left. Frame numbers are 1-based. A fresh canvas is transparent. Comments are full lines beginning with //. canvas W H NEW project, first command only;32..512 name A readable asset name layer safe_name select or create a pixel layer frame N select existing frame, starting at 1 copy duplicate after current frame and select it blank same, with empty drawing cels duration MS current frame duration,40..5000 color #RGB or #RRGGBB also supports #RGBA / #RRGGBBAA size N brush diameter,1..48 pixel X Y one pixel dot X Y brush-sized mark line X1 Y1 X2 Y2 brush-sized line rect X Y W H filled rectangle box X Y W H outline rectangle ellipse X Y W H filled ellipse fill X Y flood fill current region erase X Y W H transparent rectangle clear clear current layer on current frame move DX DY shift current pixel cel; transparent edges pose PART X Y ROT SX SY OPACITY frame pose; existing part/layer/asset opacity N selected layer opacity,0..1 style Vector|Pixel|Dither|Ink|Mosaic|Neon|Paper|Toon styled on|off selected pixel layer follows style or raw Draw on an unlocked visible paint layer. Vector parts use pose; their SVG is separately editable in the Code panel. A styled raw drawing does not change until styled on is chosen. Changes on shared layers affect all frames. At most256 lines and32KB per batch,48 frames,9 drawing layers,32MB decoded project pixel memory. Start at64x64 and a handful of layers for small models. No trained-model performance claim is implied by these deterministic checks. WEBSITE SPROUTS — THE ACTUAL ODDSPRIG COMPONENT The studio reuses sprout-embed.js and its worker from the Oddsprig website source. Small is Qwen3-0.6B, about400MB; Standard is Qwen3-1.7B, about1GB. These are download descriptions from that component, not RAM budgets. No new model size or imaginary Sprout tier has been invented. Advanced exposes the complete code tools for larger external models and manual work. Start AI Studio.cmd, open AI / Code, choose the matching website Sprout profile, Prepare website Sprout, then Start. Preparing loads only the small component; Start is what requests GPU support and the actual runtime/model. Enable Let Sprout apply valid commands for automatic execution. Otherwise its output is staged for review. Current canvas/layer/frame state is included in each request; no raw RGBA arrays are inserted into the prompt. The app is listed in Game Tools on oddsprig.com. This desktop service is local only. The studio's vendored copy adds a system prompt, state context and result callback. It retains the original two model choices and explicit Start/Stop. AI DRAWING PROFILE LIMITS (enforced by the same code engine wrapper) tiny: website Small400MB;24 lines,2KB,64px side,8frames,3paint layers. small: website Standard1GB;80 lines,8KB,128px side,24frames,6paint layers. advanced: external/manual;256 lines,32KB,512px side,48frames,9paint layers. CLI run defaults advanced; --profile tiny or --profile small restricts it. Live send/tool/API default tiny; supply profile:'small' or 'advanced' for those sessions. Each profile still observes the32MB decoded project budget. An unknown model name is not evidence of compatibility or quality; actual model inference must be measured separately under the shared test lane. ADDED DRAWING COMMANDS (small and advanced profiles) gradient X1 Y1 X2 Y2 #ENDCOLOR gradient from current color to the end color polygon X1 Y1 X2 Y2 X3 Y3 filled triangle in current color blend normal|multiply|screen|overlay|add alpha on|off selected layer transparency lock clip on|off selected layer clips to art beneath AUTOMATIC WEBPAGE INSTRUCTIONS (0.004) The webpage now fetches its selected AI-PROFILE-400MB.txt or AI-PROFILE-1GB.txt from the app automatically when preparing the website Sprout. It reads only the MODEL PROMPT section and supplies that text as the worker system prompt. You do not need to open a TXT file or paste instructions into the conversation. The served files inside app/ are the runtime authority. Editing a root-level reference copy does not alter the runtime file. The app shows which file loaded. The400MB prompt is limited to1600characters;1GB to2800;advanced to4000. The full manual is not inserted into the small model's context. External AI hosts can register get_asset_instructions from AI-TOOLS.json. GET /api/instructions?profile=tiny returns the same compact instructions. CLI: node app/ai/studio.cjs instructions --profile tiny Tool: {"name":"get_asset_instructions","arguments":{"profile":"tiny"}} ANIMATION BACKEND (0.006) Read ANIMATION-QUICKSTART.txt for the human walkthrough. Animate > Open animation AI selects the matching 400 MB or 1 GB guide automatically. Only that compact MODEL PROMPT is sent to the model; no raw pixels or SVG. The one-line recipe is: animate all float 8 125 TARGET: all (whole artwork), asset (code art only), or an exact part/layer ID. MOTION: idle, walk (bounce in place), float, cast, spin, squash. FRAMES: 2..32 added after the selected frame. MS: 40..5000 per frame. Existing frames and copied pixel colors remain intact. Only target transforms change. The cycle sets smooth looping playback; playback once step changes to one stepped pass. Locked paint targets must be unlocked by the user first. Undo restores the complete previous timeline. Tiny animation: at most 8 added frames / request; commands animate, frame, duration, playback. 1 GB animation: at most 24 added frames / request; also copy and pose. Advanced animation: at most 48 added frames / batch, 32 per cycle. All can operate on existing artwork up to 512 x 512 without scaling it down. Global 48-frame / 32 MiB decoded-cel limits still apply. Animation task rejects drawing/reset commands. CLI (desktop): node app/ai/studio.cjs instructions --profile tiny --task animate node app/ai/studio.cjs run app/examples/float.draw --input Projects/art.cas.json --out Projects/animated.cas.json --profile tiny --task animate node app/ai/studio.cjs state --profile tiny --task animate node app/ai/studio.cjs send app/examples/float.draw --profile tiny --task animate --revision N Tools: get_asset_instructions({profile:'tiny',task:'animate'}), inspect_asset({profile:'tiny',task:'animate'}), animate_asset({profile:'tiny',revision:N,commands:'animate all float 8 125'}). AI-TOOLS.json has the real schemas. HTTP (desktop token required): GET /api/instructions?profile=tiny&task=animate, GET /api/state?profile=tiny&task=animate, POST /api/commands {profile:'tiny',task:'animate',expectedRevision:N,commands:'animate all float 8 125'}. Browser: await OddsprigAI.getInstructions('tiny','animate'); OddsprigAI.getAnimationState(); OddsprigAI.animate('animate all float 8 125',OddsprigAI.inspect().revision). Inspect first. A stale revision or invalid command fails without applying part of the batch. Do not blindly repeat a previous animation request; it adds another cycle. Save editable projects and preview the motion before exporting. Instruction and transport verification is separate from actual model inference quality. These guides are intentionally short enough for the website Small/Standard Sprout integration; a model may still need a simpler request or a corrected command.