AI Workflow Overview
Build a game by describing it.
This guide takes you from an empty project to a deployed game without placing a single node by hand, without writing the JavaScript, and without drawing the art. You describe what you want in plain language; the AI does the building.
There are two routes through XGENIA. The Workflow Overview is the manual one — you place and wire every node yourself. This page is the other one.
AI Agents is in early alpha. It is included in every XGENIA plan and is paid from your plan's AI credits: there are no API keys to set up. Screens change often.
What you need to know before starting
Very little about XGENIA itself.
You do not need to know what a node is, how signals connect, which component a page lives in, how to write a JavaScript function node, or how to draw a spin button. Every one of those is something the AI does and can explain afterwards if you are curious.
What you do need is to know what game you want. The AI will build whatever you describe, quickly and without arguing — which means a vague description gets you a vague game. "Make a slot game" produces something generic. "A 5×3 slot with a candy theme, a spin button that disables while the reels are turning, and a balance that goes down on each spin" produces what you asked for.
So the skill this guide teaches is not XGENIA. It is describing a game precisely enough to be built, then checking what came back.
| You bring | The AI brings |
|---|---|
| What the game is and how it should behave | Components, nodes, wiring, JavaScript |
| Judgement on whether it looks and feels right | Art, animation, sound, layout |
| Decisions when there is a real choice to make | Debugging, verification, deployment |
The shape of it
Fifteen steps, in three phases. Setup is done once per project; the build loop is where you spend your time.
| Phase | Steps | What happens |
|---|---|---|
| Set up | 1–7 | Create the project, open the panel, connect a model, add your keys, write your standing rules, and confirm the AI can read your project |
| Build | 8–12 | Scaffold the game, build the screens, wire the logic, generate the art, finish the assets |
| Ship | 13–15 | Make it verify itself, checkpoint, deploy |
If you have already set up once, start at Step 8.
Step 1 — Create a new project
Launch XGENIA. You land on your Games: the game you worked on last as a large Continue card at the top, with Open, Resume chat and Reveal folder, and every other game below it, grouped by when you last opened it.

The bar along the top has the two ways in: Search, or describe a game to build in the middle (Ctrl+K), and New game on the right. Click New game.
The dialog has both routes side by side:
| Side | What it does |
|---|---|
| Describe it — the AI builds the first version | Type what the game is. The button at the bottom changes from Create empty game to Start with AI, and the AI starts building as soon as the project opens. The chips under the box — Crash game, space theme, Wheel of fortune with 12 segments, Keno, 40 numbers, pick 10 — fill it in with an example. |
| Or start from | The Hello World template (simple application), or One of your games, to start from a copy of something you already built. |
Along the bottom, Name and Folder. When you describe a game, the name is filled in from your description; change it if you like. The folder is chosen when you create.
Which one should you pick?
Describe it if you know what you want to build. This is the route the rest of this guide assumes, and the description is your first build prompt — write it the way Prompting that works describes.
Hello World if you want to set everything up first — model, rules, keys — and send the first prompt yourself. Steps 3 to 7 assume this. It is also a good way to watch the AI's first change on something tiny: with nothing else in the way, you can see exactly what it changed.
Whichever you choose, the AI can read and rewrite what is there. A template is a starting point, not a commitment.
Step 2 — Meet the editor
The project opens: the game's viewport at the top, and the node canvas that produces it below.

Above is a game a few prompts in — the AI has generated the art and placed it, and started on the maths nodes below. A Hello World project opens with one small page: a single Text node.
Either way, you are not going to touch this canvas by hand.
Along the top bar: back, forward, undo and redo on the left; the page you are viewing in the middle; and on the right the Desktop · 100% device and zoom picker, the timeline and game-speed controls, the Edit / Preview switch, and Publish.
Down the far-left rail are the editor's panels. Reading top to bottom: Chat, Components, Search, Assets, Project Styles, Maths RGS, AI Image Editor, Hierarchy and History — then, at the bottom, Version control.
Step 3 — Open the Chat panel
Click the Chat icon at the top of the left rail. The XGENIA AI panel docks beside your canvas, so it stays open while it works — you watch art land in the viewport and nodes appear on the canvas in real time.

What you get on a fresh conversation:
- The header — a green dot when the panel is connected, and four icons: Chat history, New chat, Debug Export and Settings.
- Suggestions under Try asking about — What nodes are in my project?, Summarize my node graph structure, Help me understand my application structure. Safe read-only prompts, useful for confirming the AI is actually wired to your project.
- The input box — "What would you like to do?", with + to attach images and files, a microphone for dictation, and Send. Type
@in the box to mention a specific node. - The footer — the active model on the left (click to switch), then the context meter and the running cost (click for the token breakdown).
If you see an upgrade prompt instead of the chat, your account has no plan yet: choose one at primora.xgenia.com. If you see a sign-in form, sign in with your XGENIA account.
Step 4 — Connect a model
Click the Settings gear in the panel header. The Provider & Tools sheet slides over the panel, with its tabs along the top: AI Provider, Pre-Prompt Rules, Tools, MCP Servers, Image AI, Messaging, Skills, Knowledge and Debug.

On the AI Provider tab:
- No key to paste. Signed in with your XGENIA account, the AI is paid from your plan's AI credits. (Older versions of this guide asked for your own OpenRouter key; with a plan you do not need one.)
- Main model. The current choice is at the top, with its context length and price per million tokens. Below it the full catalogue — several hundred models, live from OpenRouter. Search by name or type an exact model id, filter with All, Tool use, Vision or Free, narrow by maker, and sort by Newest first, Name or Lowest price.
Which model? Building in XGENIA is a long tool-calling session, not a single question — the model has to hold a plan across dozens of steps, read a node graph, and notice when its own change broke something. The default, GLM 5.3 Flash, is a good balance of cost and reliability. Free models are fine for poking around, but lose the plot on anything complex.
Sub-agents
Scroll down the same tab. Specialists sit behind the main model and are dispatched automatically.
| Setting | What it does |
|---|---|
| Vision model | Reads screenshots when the main model cannot see images, and reports what is actually on screen. |
| UI specialist model | Writes the HTML screens that are translated into XGENIA nodes, reviews scripts, and verifies finished work. |
| 3D Model creation | Beta · pending release. Nothing uses it yet; the model you pick is saved for when it ships. |
Each picker opens on the 40 newest models on OpenRouter, with a recommended pick at the top; search to reach any of the others.
Further down, Routing and sampling:
| Setting | What it does |
|---|---|
| Nitro routing | Appends :nitro so OpenRouter routes to the fastest provider. Skipped for models that already have a variant such as :free; a model with no nitro route is retried once without it. |
| top_p / top_k | Leave blank. Blank means the parameter is not sent at all, and each provider's own defaults are tuned for tool calling. |
The vision sub-agent is worth setting up properly: it is what independently checks the main model's claims about what it built.
Step 5 — Write your standing rules
Do this before your first build prompt, not after the third argument about spacing.
Switch to the Pre-Prompt Rules tab. The tab says it plainly: your rules are placed at the start of the assistant's instructions, in this order, and take priority.

Click Add Rule to create one. Rules apply in the order they are listed, in every conversation in this project.
Rules that earn their place describe a standard, not a task:
Name: UI Rules
Keep the UI clean, consistent, and responsive. Maintain consistent
spacing, alignment, sizing, and typography. Do not let elements
overlap or go outside the viewport. Do not rebuild the existing UI
unless explicitly instructed to rebuild it.
Name: Assets Creation Rule
Create only the requested asset, with no extra UI elements, text,
headers, buttons, or decorations. Reuse existing assets whenever
possible instead of creating duplicates. Match the existing visual
style, theme, and proportions.
Notice the shape of both: they are mostly restraints. Left unbounded, an AI adds things you did not ask for. Most of the value in this tab is telling it what not to do.
A rule is silently skipped if it would break the assistant's ability to work at all — anything containing never use tools, skip tools, ignore tools, avoid calling, generic html, generic css, use bootstrap, or use tailwind. If a rule never seems to take effect, check for those phrases and rewrite it as a positive instruction about the result you want.
Close the sheet with the × in its top-right corner.
Step 6 — Art, and the one optional key
Images, video and audio the AI generates are paid from the same AI credits as the chat, so there is nothing to set up for art. (Older versions of this guide asked for a fal.ai key; with a plan you do not need one.)
Google Fonts — optional, cheap
Without a key the font picker uses a curated list. With one, it shows the full Google Fonts catalogue. Get a free key from the Google Cloud Console, paste it and click Save.
If the AI keeps reaching for the same handful of typefaces and none of them suit your design, this is usually why — it is choosing from a short list, not thousands.
| What | Set up? | Unlocks |
|---|---|---|
| The AI itself | Nothing: your plan's AI credits | Chat, building, debugging |
| Images, video, audio | Nothing: the same AI credits | Art generation |
| Google Fonts key | Optional | The full font catalogue |
Full detail: Tools & Integrations.
Step 7 — Confirm the AI can see your project
Before asking it to build, ask it what it sees. Click the first suggestion, What nodes are in my project?, or type it.
Three things to read in the reply:
The tool calls. Each step the AI takes shows as a Tool row with its name — discover_components, inspect_node, create_nodes_batch — then a Result row, then a collapsed Thinking Process. Click any of them to expand it. This is what the AI really did, as opposed to what it says it did.
The footer. The context meter fills as the conversation grows, and the cost next to it runs up. Click the cost for the breakdown — model, input, output and cache tokens, total cost, and how much of the context window the last call used. Watch it over a long build; when the context fills, start a New chat.
The answer itself. On a fresh Hello World project it describes the one small page that is there. That is the AI reading your live graph, not guessing. If the reply is wrong about your project, fix that before building anything.
Step 8 — Scaffold the structure
Ask for the shape of the app before any detail.
Scaffold a slot game: a Home screen with a Play button, a Game screen,
and a Settings screen, with navigation between them and a shared TopBar.
For anything non-trivial the AI plans before it builds, and says what it is about to do between tool calls. Read those lines as the build goes: they are the fastest way to see whether a long build is still on track, or whether it quietly dropped half of what you asked for.
Earlier builds had a Tasks button under the input that opened an AI Task Plan panel. The current XGENIA AI panel has no Tasks button; the plan lives in the transcript.
Step 9 — Build the screens
Work one screen at a time. Compound requests are where plans drift.
On the Game page, build the HUD: balance on the left, bet amount in
the middle, and a spin button on the right. Full width, 72px tall.
Two accelerators worth forming a habit around:
- Show a mockup. Attach an image with +, or paste a screenshot with Ctrl+V, and say "build this". Far faster than describing a layout in words.
- Point with
@. Type@to mention a specific node, so there is no ambiguity about which "Button" you mean.
You can switch models mid-conversation without opening settings — click the model name at the bottom of the panel.
The menu has a search box, a Thinking slider from Faster to Smarter (the middle setting is marked Recommended), and your models — the default is tagged DEFAULT and new arrivals NEW. More models opens the full catalogue.
Use a cheap model for questions and a strong one for building; the quick menu makes the swap a single click.
Step 10 — Wire the logic
Describe behaviour as an outcome, not as a node recipe.
When Spin is pressed, disable the button, play the reel animation,
then re-enable it when the animation finishes.
The AI places the logic nodes, connects the signals, and writes JavaScript function nodes where node logic would be clumsy.
When it wants to run a script against your project rather than just write one, it posts an approval card instead — the plain-language description of what it will do, the code itself, and Run / Cancel.
Deal with these while they are on screen. The AI does not wait for you — it carries on, and the card expires after about three minutes. If you already know the pattern you want — "use a state manager for this" — say so, and it will.
Afterwards you can ask it to explain itself: "trace what happens when Spin fires". It walks the whole signal chain and tells you where each connection goes. That is worth doing on anything you did not watch it build.
Step 11 — Generate art and audio
Art is paid from your plan's AI credits (Step 6). Pick your models on the Image AI tab.

Models are organised by job, not category: Create new images (text → image) and Edit an image (image → image). One active model per job — the tab shows it as In use at the top, and Reset to defaults puts the defaults back.
Each model in the list carries its price band ($ to $$$) and a transparent badge if it can produce a transparent background; Use makes it the active one. Tick transparent only to hide the rest. That is the trap that matters for game and UI assets: icons, symbols and sprites need alpha, so find out here rather than after generating forty opaque coins.
Approving the key art
Generated key art arrives as a card showing the image, the prompt that made it, and three buttons: Approve, Request changes, Reject.
Request changes opens a revision editor with two ways in: describe the fix in words ("warmer light, drop the border") and let the AI rewrite the prompt, or edit the original prompt yourself.
Read that card carefully, because it behaves differently from the code-approval gate: it is on a timer — currently five minutes — and when it runs out the image is auto-approved. The build does not stop and wait. The AI says so in its next message: "The key art was auto-approved (nobody answered within 300s)".
An approved key art becomes the project's style anchor: every later image is generated as a variation of it, and the screen's symbols, buttons and backgrounds are cut out of it. Miss the timer on a mediocre first image and you have set the look of every asset that follows.
Key art from a samurai slot build — the reel symbols, the spin button and the backdrop were all cut from this one image.
Step 12 — Finish assets in the Image Editor
Step 11 is generation inside the build loop — you ask, the AI generates, the AI places it. That is the right tool when the asset is a means to an end.
When the asset is the end — your key art, your character, the icon set the whole game is judged on — switch to the AI Image Editor in the left rail (Ctrl+Alt+7). It is a panel in its own right, not a step you have to reach through the chat, and despite the name it generates video and audio too.

It is a real layered canvas, not a prompt box. Brush, eraser, marquee select, text, rectangle, ellipse, line, import — each with a keyboard shortcut — plus Layers, Dimensions, and an Export button, with the generation bar along the bottom.
Not right? Tell the AI to change it — you do not have to redraw anything
This is the part worth emphasising: the Image Editor is not a manual retouching tool you fall back to when the AI fails. It is where you keep asking the AI for changes, on an image that already exists, until it is right.
Select the image and type what is wrong into the prompt bar at the bottom. The selected image attaches itself as a reference, so the model is editing what is there, not generating something new and hoping it matches.
| The problem | What you do |
|---|---|
| The whole look is off | Say what to change in the prompt bar and regenerate from the current image |
| One region is wrong — a hand, a button, a face | Edit area: mask just that part and prompt. Only the mask changes; the rest of the picture is untouched. Hold Alt to carve a hole in the mask |
| Too small / too soft | Crisp upscale (keeps what is there) or Creative upscale (lets the model add detail) |
| It has a background and you need alpha | Remove background — no need to regenerate on a transparent-capable model |
| Colours clash with your palette | Adjust colors on the layer |
| It needs to be an exact size | Type it into Dimensions. An icon that must be 512×512 is a number, not a ratio you eyeball |
| The composition is fundamentally wrong | Block it out roughly with the shape tools and generate over it |
Every row of that table is an AI operation. You can run the entire refine loop — fix, check, fix again — without painting a single stroke by hand.
The brushes, shapes, text and the full paint engine are an option, not a requirement. They are there for two cases: you want to correct something by hand because it is faster than describing it, or you are an artist and would rather paint than prompt.
If you are neither, ignore that entire toolbar. Nothing in this guide needs it. The prompt bar, Edit area masking, and the one-click actions cover the whole workflow on their own.
Animate it — video and audio come out of the same box
Despite the name, the Image Editor is not limited to stills. Switch the model and the same prompt bar produces motion.
Open the model chip and pick from Image to Video — feed it the key art you just finished and describe the movement. That is how a static background becomes a looping scene, a character starts breathing, or a win celebration gets its animation. Text to Video generates a clip from a description alone.
The same applies to sound: Text to Audio for music and effects, Text to Speech for voice.
So the sequence for a piece of game art is one continuous loop in one panel: generate the still → fix it with prompts and masks → upscale it → animate it → export it.
Import works on your project, not your filesystem
Import (I) does not open a file dialog. It opens Select Project Image — a grid of the assets already in your XGENIA project.
So fixing an icon that is already in your game is two clicks, not an export–edit–reimport round trip. The imported image also attaches to the prompt bar as a reference, so the next generation can work from it.
Select a layer with an image in it and the Actions list grows from three entries to seven: Crisp upscale, Creative upscale, Remove background and Vectorize join the masking tools. Remove background is the escape hatch when you generated a good asset on a model that cannot do transparency — cut the background rather than regenerate.
Double-click the image on the canvas and you land in the Layer editor, which has two modes.
It opens on Objects: an AI decomposition that finds the separate things inside a flat generated image so you can edit one of them instead of the whole frame. Optionally tell it what you want — "export only the UI buttons, each its own layer" — set how many regions to aim for, and run it (~$0.05).
Once split, every object gets a descriptive name and an eye toggle — Top samurai character, Main SPIN button, Geisha symbol reel column — and you can Export as PSD: a layered Photoshop file with those names intact. That is how a generated slot screen becomes a set of assets a designer can finish or a game can load separately. Walkthrough: Export to PSD.
One caveat worth planning around: a split is bound to the exact image it was made from. Edit the picture afterwards and the split is dropped and must be paid for again — so finish the art first, split last, and export straight away.
Click Paint and it becomes a real paint engine — this is the artist's route, and you can skip it entirely. A mixing palette you actually mix on, brush families (sketching, inking, watercolour, charcoal, airbrushing), your own stack of paint layers with blend modes, and a wet-media surface simulation with relief, gloss, staining, granulation and drying.
It is a proper tool rather than a token brush, so if you can paint, painting is available. If you cannot, the AI route above gets you to the same place. Brushwork is flattened and wet paint sets after a few seconds, so blend while it is live and use Save to canvas or lose it.
The Model Hub
Click the model chip in the prompt bar. Several hundred models, grouped by what they do:
| Group | Categories |
|---|---|
| Image generation | Image to Image, Text to Image, Inpainting |
| Video generation | Image to Video, Text to Video |
| Audio & speech | Text to Audio, Text to Speech |
| Tools | Image to Vector, Remove Background, Upscale |
The Image to Image group is the largest, which tells you what this editor is really for: changing pictures you already have.
Read the badges rather than the descriptions. If your asset has text in it, a model without TYPOGRAPHY will fight you no matter how carefully you prompt. Favorites keeps the handful you actually use one click away.
Settings holds aspect ratio, an Enable Web Search toggle for subjects the model may not know, and an experimental generation limit. Count generates several variations at once — worth it while you are still finding the look, wasteful once you know it.
Keep the work
Open Canvases and turn on Sync to Repository — write changes to file system for Git. Art that lives only in the editor's memory is not in your repository, not on your teammates' machines, and not in any commit you can roll back to.
The History panel (clock icon, bottom-left) records every generation. It earns its keep on the fifth variation, when the version you liked was three prompts ago and you cannot remember the wording.
Full detail: AI Image Editor.
Step 13 — Make it verify itself
This is the step people skip, and the one that makes AI building trustworthy.
Open the preview, click through the whole flow, screenshot each screen,
and tell me anything that looks wrong.
The AI can drive a browser preview: navigate, click, type, read the console, and screenshot. The vision sub-agent then reviews those screenshots independently. When it disagrees with what the main model reported, the panel draws a warning banner above the reply — written by the chat UI, not by the AI. When the banner and the prose disagree, believe the banner: it is the one that looked.
Step 14 — Checkpoint as you go
XGENIA has Git built in, and the AI can use it.
Commit this as "HUD complete" before we start on the paytable.
Checkpoint before every risky change. It is the cheapest insurance available and it beats hunting through undo history after a build goes sideways. There is a starter skill for exactly this discipline — see below.
Step 15 — Deploy
Deploy this to Vercel.
The AI handles the deploy and reports the URL back. It can also set up a Supabase project, connect services, and inspect cloud functions. For slot projects it can create RGS games, extract maths, run RTP health checks, and produce certification reports — see XGENIA RGS.
Let Claude Code drive
Everything above — writing the brief, watching the build, checking the result, recovering when it stalls — can be done by Claude Code instead of you, through the xgenia plugin. You tell Claude Code what game you want; it writes the brief, sends it to this panel, polls the transcript, watches the cost, and then presses the game's buttons itself to check the result.

The two AIs split the work cleanly. The panel knows XGENIA, so it does the building. Claude Code knows what you asked for, so it holds the panel to it — and, unlike the panel, it checks the running game rather than the graph.
See Build a Game with Claude Code for a full run, and Driving XGENIA from Claude Code to install the plugin.
Making the next session smarter
Two stores travel with your project, both git-friendly, both injected into every conversation.
Skills — how to do things
Procedural memory in .xgenia/skills/. XGENIA ships a set of starter skills covering the patterns that go wrong most often — checkpoint discipline, slot spin wiring, runtime verification, working in the right component, music and SFX generation, game feel.
Add your own after something works: "save what you just did as a skill called …". Save a project skill with the same name as a starter to override it.
Knowledge — what is true about this project
Facts in .xgenia/brain.json, captured automatically as the AI works — each connection it wires, each parameter a node rejects, each signal it verifies end to end.
The tab is honest in a way most dashboards are not. Its summary line counts the facts in use, the ones ever recalled, the ones retracted, and how many components are mapped — and you can search the facts and retract anything that is wrong. A new project reads "Nothing learned yet beyond the canvas wiring." If the AI asks what a component is every session, few components are mapped; one prompt fixes it: "digest every component".
What still needs you
Almost none of it is technical. The AI is fast, not autonomous — what it cannot do is decide what you want.
| Yours | Why |
|---|---|
| Approving code execution | Scripts post a Run / Cancel card — and expire after about three minutes if you ignore them |
| Approving key art | Five-minute timer, then it auto-approves and sets the visual direction for everything after it |
| Deciding the architecture | It will happily build a bad structure very quickly |
| Judging whether it looks right | Screenshots catch broken; they do not catch ugly |
| Knowing when to start fresh | Long conversations drift — new task, new conversation |
Prompting that works
| Do | Instead of |
|---|---|
| "In the Game component, make the spin button full width" | "Make the button bigger" |
| "The button should be disabled until both fields have text" | "Add a condition node" |
| "Take a screenshot and confirm before saying it's done" | Assuming it checked |
| One goal per message | A six-part request |
@-mention the node | "the second button" |
| "5 reels, 3 rows, symbols fall from the top" | "make it look like a slot game" |
When it goes wrong
| Symptom | What to do |
|---|---|
| Red dot on the model bar | No verified API key — open Settings → AI Provider and save it |
| A Model Error card in the chat | The model provider refused the turn. Rate limit — wait; the panel already retried for two minutes. All providers have been ignored — your OpenRouter privacy settings block that model's provider. Unavailable for free — the free variant was withdrawn; pick another model |
| It edits the wrong component | Tell it which component to switch to, or @-mention a node inside the right one |
| It claims work it did not do | Expand the Tool and Result rows and read the actual tool calls |
| It keeps saying "let me take a fresh approach" | It is thrashing and leaving duplicate nodes behind. Stop it, and send one narrower request |
| It stops mid-build | Check the context meter in the footer — you may have filled the window. Start a New chat |
| It keeps adding things you did not ask for | That is a Pre-Prompt Rule, not a per-message correction |
| A build goes badly wrong | Revert to your last Git checkpoint |
| A code approval card will not run | It expired. Approvals go stale after about three minutes — ask the AI to do the work again |
| Key art you did not want became the style anchor | The card auto-approves after five minutes. Reject the next one and regenerate; art already derived from it will need redoing |
| It cannot generate any images | Check you are signed in with your XGENIA account and have AI credits left (see your plan and credits at primora.xgenia.com). This looks like the AI being bad at art, but it is usually the account |
| It keeps choosing the same few fonts | No Google Fonts key — it is picking from a curated list, not the full catalogue |
| A layer split vanished after you edited the image | Splits are bound to the exact image. Finish the art first, split last, export the PSD immediately |
| It asks what a component is every session | Nothing has been digested — ask it to "digest every component", then check the Knowledge tab |
Where to go next
| Next | What it covers |
|---|---|
| Build a Game with Claude Code | The same workflow, driven by Claude Code from outside the editor |
| AI Agents — Getting Started | The setup steps above, in reference form |
| The Chat Panel | Every control, explained |
| What the AI Can Do | The full tool catalogue |
| Tools & Integrations | The Fal.ai and Google Fonts keys |
| AI Image Editor | The canvas, its tools, and the Model Hub |
| Export to PSD | Turning a flat generated image into a layered Photoshop file |
| Models & Providers | Model choice, sub-agents, routing |
| Pre-Prompt Rules | Standing instructions in depth |
| Skills & Knowledge | Project memory in depth |
| Workflow Overview | The manual route — for when you want to build something yourself |
| Fundamentals | Components, signals and structure — optional, but it makes your descriptions sharper |