AI agent
The AI panel (Window > AI Mode, toolbar AI, Ctrl+Shift+A) drives the whole engine from a prompt: scenes, objects, components, scripts, materials, UI, generated art, levels, saving, building and a play test.
No model is needed for most of it. Scenes, adding and changing things, the light, and games that collect, fight or race are done by the engine itself, in English or Arabic, with real models from the internet: see the Director. A connected model takes only what those rules do not understand.
Connect a model
Click MODEL in the panel: pick NVIDIA, DEEPSEEK, OPENAI or LOCAL (Ollama), or type any OpenAI-compatible URL, paste the key and press CONNECT. Model is a dropdown of what that endpoint offers, the models proven on this agent first; picking one asks it a question and says how long it took, or why it cannot be used. Type a model's name... at the end of the list is for anything else. Under the dropdown is what the model can take. Without a model, what the engine cannot do by itself falls back to the offline level planner, or it says what it can do. The key field is masked and the key is hidden from error messages, logs and files the agent reads.
- A key belongs to one address: moving to another endpoint leaves it behind, so it cannot be sent to the wrong service.
- On a Mac a key is kept in the Keychain (Neux AI key), one for each address, and Forget key takes it out. Elsewhere it lasts the session. It is never in a file, and the agent cannot read it.
- Environment:
NEUX_AI_URL,NEUX_AI_MODEL,NEUX_AI_KEY; editor flags--url,--model,--key. - The URL and model name are remembered in
artifacts/editor-ai.json. - NVIDIA:
https://integrate.api.nvidia.com/v1. HTTPS needs thetlscargo feature (on in the scripts).
Each model is asked for all it can give: how long a reply may run, how much of the run stays in the conversation, how many calls a run may make, how hard it thinks, and whether it is sent pictures. Replies are streamed, because NVIDIA's service cuts a silent line at 300 seconds and a model that thinks for longer would never answer. What an endpoint turns down it is asked again without. A model nobody has measured gets the small safe limits. Being on an endpoint's list does not mean a model works for a key, or works quickly: NVIDIA lists models a free key cannot use, and popular ones can sit in a queue for minutes. scripts/agent-compare.py gives several models the same jobs and prints how each did: that, not a model's name, decides what goes at the top of the list. A run that says Finished proves little: open the game and look (neux player --project P --scene S --frames 180 --screenshot X).
NEUX_AI_EFFORT (low, high, max) sets how hard a model that can be told thinks. DeepSeek V4 Pro at max took four minutes a call, at high under one.
What you see
Before a run can say it is done, the scene is validated, the stored tests are run and the agent is shown the game as a player will see it, with a reminder to compare it with what was asked: left to choose, models called games finished without once looking at them. Shown a mistake, a model will wipe the whole scene and build it again, mistake and all, so a run cannot start over a scene it has built: it has to fix what is wrong where it stands. A menu or another level gets a path of its own.
A run shows the model's words, its plan (APPROVE or REJECT, unless AUTO is on), grouped tool cards with a status dot per call, a DONE card with the totals and UNDO ALL (scene edits and written files), and an error card with RETRY. STOP ends a run; NEW starts a fresh chat. Follow-up prompts see the last turns.
Looks, speed and next ideas
- Premium looks:
environmentsets sky, sun, fog, ambient and a ground together (presets: sunny_day, golden_hour, overcast, night, foggy_morning, desert, snow);polyhavenfetches real CC0 photographed skies and PBR colour maps (search,hdri,texture; asks for internet permission);find_assethas realistic rigged characters (Michelle, Soldier, Xbot, Fox, Horse) and props. The guide tells the model how to keep one coherent style. The renderer draws normal, metal/roughness, occlusion and emission maps when a material has them. - Speed: the renderer skips objects outside the camera's view (the sun's shadows still see everything). The
performancetool audits lights, textures, models, particles and per-frame script work, andfixshrinks oversized PNG textures without visible change; the guide asks the agent to run it before finishing. - Next ideas: when a run finishes, up to four suggestions appear as quick options under the result; one click sends it. The model writes them (
suggestionsin its final reply); general ones appear when it does not. - Typing: Enter sends, Shift+Enter adds a line.
What it may do without asking
You approve the plan first. After that, ordinary scene work (objects, components, materials, UI, levels, saving, looking, play tests) just runs. Anything that reaches outside the scene needs its own yes, on a card with Allow (this one), Allow all this run (this kind) or Skip:
| Kind | Examples |
|---|---|
net | web_search, web_get, download, polyhaven |
code | writing a .cs script, a script recipe |
delete | delete_file |
build | build |
shader | writing a .glsl file |
history | undo, redo or jump in the editor's history |
Auto (left of the send button) skips the questions; Local forbids the internet outright (the agent works from the project, procedural meshes, generated sounds and the recipes). Replacing the open scene (scene new / open) needs it saved first or an explicit discard, and a copy of what is replaced goes to Library/Recovery.
Always, whatever you allow: scripts are screened before they are written (no file, network, process, reflection or native APIs); downloads reach public addresses only (each redirect is re-checked and the connection is pinned to the address that was checked), never code, and are recorded in CREDITS.md; paths cannot leave the project, cross a symbolic link or touch Builds/, Players/, Library/ or ProjectSettings/ (settings have their own tools, which refuse the fields that decide where a key is sent); build names are sanitised and a build only cleans a folder a build made; a run is limited to 300 MB and 600 files. Stop ends a play test and lets go of its keys. Undo all takes back scene edits and files, keeps files you edited after the run, and asks twice when you changed the scene afterwards.
Headless: neux agent approves the plan by running, and skips the actions above unless you pass --allow net,code,delete,build,shader,history (or --auto); --local-only forbids the internet.
This is a safety net against mistakes and prompt injection, not a sandbox: an approved script runs as you.
CLI
neux agent --project DIR "make a small coin game" --url ... --model ... runs the same loop headless; see docs/ai-agent-guide.md for the tools and rules the model is given.
Verified by scripts/features/ai-agent.sh (unit tests with a scripted model, and the ai-agent editor gate).
What the agent can do
Everything the editor can: objects and components (any), scripts (compiled together with the project's others), materials, UI screens, generated art, whole levels, scenes, build settings and builds for every platform, a play test, and the world outside the editor: web_search / web_get to find things, download for models, textures and sounds (public web only, never code, 100 MB cap), model_info / place_model / auto_rig to bring in and animate a character, animation_clip for keyframed motion, prefab, and project_settings for sky, fog, input and tags.
It checks its own work
After building, the agent evaluates the result inside the editor, then fixes what it finds:
validate: a checklist (no camera or light, missing materials/models/scripts/clips, UI outside the canvas or text wider than its box, duplicate names, scripts that do not compile, missing build scenes).playwithhold(keys pressed on a timeline),watch(values read at the start and end, so "the player moved" is a fact) andlook_at(a look during play), plus the console errors.look: the game, scene or window view as words (brightness, washed-out or black areas, colours, detail, where every object is on screen or that it is off screen) and, when Send pictures to the model is on (OpenAI-style endpoints), as the picture itself. Pictures are also saved asartifacts/agent-look-N.png.
Copying text
Chat text is selectable: drag across it with the mouse and press Cmd/Ctrl+C. Copy in the header copies the whole chat, and error cards have Copy error. Failed actions stay visible (with their error) even when the action list is folded.
Sound, assets and scripting services
- Finding assets:
find_assetsearches a built-in catalog of free models, sounds, sprites and fonts with direct links that are known to work: Kenney's CC0 starter kits (cars, tracks, engine / skid / impact sounds, coins, jumps, weapons), the Khronos glTF samples and three.js characters. Models the engine cannot read (Draco / meshopt compression) are left out, anddownloadchecks every model it fetches and removes the ones it cannot load. - Making sound:
generate_soundmakes effects, engine hums and looping tunes from nothing (ae_assets::sfx). - Playing sound: the engine plays WAV, Ogg Vorbis, MP3 and FLAC. Scripts use
Audio.Play(clip, volume, pitch, loop, bus),Audio.PlayAt,Audio.SetPitch/SetVolume/Stop; objects use anAudioSource. - Other script services:
Time.timeScale,Scene.Load/Next/Reload,Scene.LoadAsync(a loading screen),Application.Quit,PlayerPrefs. - Recipes:
ChaseCamera,ArcadeCar,FollowParent,LapTracker,Collector,EngineSound. - Physics from scripts:
go.rigidbody(velocity, AddImpulse, AddForce),go.AddRigidbody/go.AddColliderfor spawned objects, Kinematic platforms that carry what stands on them. - Live changes:
go.Set(component, field, value)for any component field (lights, cameras, particles, sprites, sounds),go.SetColorto tint,go.SetModelPartto turn a named part of a model (wheels),Scene.Loadalso while playing in the editor. - Groups: while playing, children are carried rigidly with a parent that a script, the physics or an animation moves.
- Known limits: a script adds and removes components while playing (
AddComponent,RemoveComponent) and sets any component's fields (Set), but reads back only the ones the API names (Transform, Rigidbody, Animator...).