# GodotAI Dev — Local AI assistant for Godot 4 (no cloud, no API keys)

GodotAI Dev — Local AI assistant for Godot 4

I’ve been working on a local AI assistant for Godot 4 and figured I’d share it here in case anyone finds it useful. Fair warning: this is a rough, early version — not fully tested, no guarantees. Your mileage will vary quite a bit depending on your hardware, which Ollama model you’re running, and how much context window you have available.

That said, if you have Ollama set up and want to experiment, it might save you some time.

What it does

  • /fix — paste a Godot error and the AI reads your source files and attempts a patch
  • /feature — describe what you want to add, it generates GDScript with awareness of your existing project
  • /chat — ask anything about Godot or your code, no file writes
  • Git safety net — every patch is committed to a session branch, /undo reverts one patch at a time
  • Runs 100% locally — no cloud, no API keys, your code stays on your machine

What you need

  • Python 3.10+
  • Ollama running locally or on a LAN server
  • Models pulled:
ollama pull nomic-embed-text
ollama pull qwen2.5-coder:14b
ollama pull qwen3.5:2b

Links


If you try it I’d genuinely like to know what worked and what didn’t — especially on smaller models or CPU-only setups. No promises on support but happy to take a look at issues.

2 Likes

How is this even possible?
Are you saying this can run without an internet connection? If not, then it is not %100 local.
Maybe its just the front end that is %100 local?

Indeed, the Ollama model runs locally, meaning your computer must download the model weights and run the AI. This does use a lot of compute, so the model is sometimes slower than the speed you get on AI chatbots online or using AI terminal tools that use APIs. Everything here can run without internet, AFAIK

@ja33man
So, how’s your power bill since you’ve started using this local LLM?

Ollama will run on your GPU, so nothing extraordinary will happen to your electric bill

That question was half ironic, half serious. I don’t like AI too much. But good to know regardless.

LLM is just a model that will come up with an answer from a pattern that it learned during training, since you are just asking and not training it, the power consumption will be similar to if you are building godot game or watching a movie.

So I did a quick look into this Ollama.
You download models that are general to a broad topic and the AI makes what it can out of that.
I have to believe that there are going to be holes in the information in a given model set and that you may not be getting the best out of AI.

*Note: The caveat being me not looking to deep into this.

If anyone reading this knows this AI well, and is familiar with the models this assistant imports, could this AI complete this request:

Write a GDScript function that returns the percentage of a height value compared to the height of the Eiffel Tower

The AI would need the towers height, ostensibly contained in a very large general info model, as well as the info required to produce GDScript code, theoretically contained in another model.

If anyone reading this knows this AI well, and is familiar with the models this assistant imports, could this AI complete this request:

Write a GDScript function that returns the percentage of a height value compared to the height of the Eiffel Tower

I can Answer your Question with absolutly Yes.
With one exception. I have used another local model, not the GodotAI, but localy.

```gdscript
# Constants
const EIFFEL_TOWER_HEIGHT: float = 330.0 # Height in meters (including antennas)

## Calculates the percentage of a given height relative to the Eiffel Tower.
## @param height: The height value to compare.
## @return: Percentage as a float (e.g., 50.0 for 50%).
func get_height_percentage(height: float) -> float:
        if EIFFEL_TOWER_HEIGHT == 0:
                return 0.0
        return (height / EIFFEL_TOWER_HEIGHT) * 100.0
```
My first try without stats.
```gdscript
## Returns the percentage of a given height compared to the Eiffel Tower (approx. 330m).
## @param height: The value to compare in meters.
## @return: Percentage as a float (e.g., 50.0 for 50%).
func get_eiffel_tower_percentage(height: float) -> float:
        const EIFFEL_TOWER_HEIGHT: float = 330.0

        if EIFFEL_TOWER_HEIGHT <= 0:
                return 0.0

        var percentage: float = (height / EIFFEL_TOWER_HEIGHT) * 100.0
        return percentage
```
My Second Try with these stats

total duration:       22.870564241s
load duration:        397.360279ms
prompt eval count:    71 token(s)
prompt eval duration: 135.921ms
prompt eval rate:     522.36 tokens/s
eval count:           464 token(s)
eval duration:        22.279028s
eval rate:            20.83 tokens/s

I have used a gemma4 Q4 model (with little tweaks for Ollama) with nearly 6GB on my Intel Arc 770 16GB VRAM under Debian 13.

Her are some Info about the model

  Model
    architecture        gemma4    
    parameters          11.9B     
    context length      262144    
    embedding length    3840      
    quantization        Q4_K_M    
    requires            0.30.5    

  Capabilities
    completion    
    vision        
    audio         
    tools         
    thinking      

  Projector
    architecture        clip      
    parameters          52.38M    
    embedding length    3840      
    dimensions          3840      

  Parameters
    num_ctx        8192    
    temperature    0.6     
    top_k          20      
    top_p          0.95 

Yep, Gemma4 is impressive as a local model. It’s the first time I’ve seen it run flawless on AMD (ROCm) with modern cards. I got Gemma E4B and “gemma-4-12b-coder-fable5-composer2.5-v1” running at the same time on my AMD Radeon RX 9070 XT (with LM Studio). I have Installed OpenCode and OpenWebUI to have a chat and using Codium with “Continue” to code with them (mostly autocomplete). The 12B model for the chat and planning, and the E4B (as it is better with tool calls) for the execution. That is working really well.
I’m a little bit impressed what’s possible with local models already. But a good distance to the top commercial ones.

Is it just me or does the bot struggle to type out the response that is has already computed, when requesting for a new feature or even asking a syntax question, the bot fairly quickly processes the request but spends quite a long type actually outputting the information, it even seems to type out the answer slower than it would take for me to type it out.

This is rather confusing to me because using qwen2.5 on my Ollama asking the same questions it responds quite quickly but using it within the GodotAi Dev tool, it starts responding very quickly but takes a very long type to actually type it all out.

So far though it’s responses have been very helpful just wondering if I can bump this up a little

This should be due to hardware limits, like if you have limited GPU space; and context window of your Ollama model, when you try the cli tool it will load your godot project files (context), ollama model has context window (meaning how much info it can absorb to create an answer). Different models on ollama website will have different size of the context window (ex. Gemma4 depending on the size of the model context window is either 128K or 256K, qwen2.5 context window is 32K so much smaller). So if for example you just ask qwen2.5 using regular chat it will output answer using information that is stored in models (weights) and context that you provide in the chat (so limited info that is why, qwen2.5 just quickly outputs what it understand from this limited context), when you try cli tool it will load context directly from you godot project (so many files and context), if your Ollama model has limited context window , this full window can be allocated to info, so it will struggle to output quickly info that you are asking for since no free resources are available. Up until June this year there was Gemini CLI that had 1M context window and it had generous free tier. Now that Gemini CLI is gone, alternatively you still can use other tools that have free tier:

  1. jules dot google dot com (still 1M context window, the only difference it works with Github, so basically you maintain your project in github and when you need help you ask Jules, it will create a branch with updates that you will test before merge)
  2. Cline CLI with Ollama (local or Cloud). You install cline cli, open it with either your local model or cloud (Ollama has free tier, like ollama launch cline --model minimax-m3:cloud) in your Godot project and work like with any other CLI tool

Hope this answer helps. GodotAi Dev is in its raw ALPHA release, my hope is - because it can read errors directly from Godot server, it can help you to debug it quickly.