Skip to content

Gdevlop AI Connector#2101

Open
github-actions[bot] wants to merge 1 commit intomainfrom
extension/stumblespike/2100
Open

Gdevlop AI Connector#2101
github-actions[bot] wants to merge 1 commit intomainfrom
extension/stumblespike/2100

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 25, 2026

Description

Connections to many AIs such as Hugging Face, Open Router, Gemini, Groq or your own API and AI's

How to use the extension

This repository contains a set of Custom Actions for GDevelop. No coding is required! Simply add these actions to your project to connect your game to the world's most powerful AI models.
​🌟 Supported Providers & Features
​1. OpenRouter (Recommended)
​All-in-One: Access Llama, Mistral, Claude, and GPT through one interface.
​Get Key: openrouter.ai
​Best Free Models: google/gemma-2-9b-it:free, meta-llama/llama-3.2-3b-instruct:free
​2. Groq (Ultra Fast)
​Speed: The fastest response times for real-time NPC dialogue.
​Get Key: console.groq.com
​Models: llama-3.3-70b-versatile, llama-3.1-8b-instant
​3. Google Gemini
​Smart: High reasoning capabilities and large context.
​Get Key: aistudio.google.com
​4. Hugging Face
​Open Source: Great for community models and specific specialized AIs.
​Get Key: huggingface.co/settings/tokens
​🚀 How to use in GDevelop
​Since these are Custom Actions, you just need to fill in the parameters in the Events Sheet:
​Add the Action: Search for your AI Suite actions in the event editor.
​Fill the Parameters:
​API_Key: Your secret key (e.g., sk-or-v1-...).
​Message (Personality): Define how the AI should act (e.g., "You are a shopkeeper").
​TextInput: The variable or string containing the player's message.
​Scene_Variable: The name of the variable where the AI's answer will be stored.
​Model: The model ID (e.g., google/gemma-2-9b-it:free).
​URL (Only for Universal/Custom AI action): The endpoint URL.
⚠️ Security & Production Info
​Important: This extension is ideal for prototypes and Game Jams. The API key is stored inside the client-side game files.
​For commercial projects, a Server Proxy is recommended to keep your keys hidden.
​🛠️ Setting up a Server Proxy (Optional)
​To protect your keys in a professional release:
​Create a simple backend: Use Node.js or Python (hosted on Vercel or Render).
​Hide the Key: Store your API Key in the server's environment variables.
​Communication: GDevelop calls your server -> Your server adds the Key and calls the AI -> Your server returns the answer.
​Result: Your secret API Key never leaves your secure server.
​💡 Troubleshooting
​Failed to Fetch: If you are testing in a browser and it fails, try the GDevelop Desktop App. Desktop apps bypass most CORS (security) restrictions that browsers enforce.
​No Response: Ensure your API Key is active and you have confirmed your phone number/email with the provider (especially Mistral and Gemini).
​Trimming: These actions automatically clean up accidental spaces in your keys and model names.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

AI usage

  • I used an AI to generate some part of the code.
  • I don't understand the generated code or I don't feel able to modify it.

Example file

Exampleaiextension.zip

Extension file

AIConnector.zip


Extension by @stumblespike

You can update the extension on this "Pull Request" by commenting the update command: in the comment field, type !update, then drag and drop a zip file with your extension file in the commenting field, like how you initially submitted the extension. It should look like this:

!update [MyExtension.zip](https://github.com/GDevelopApp/GDevelop-extensions/files/12709661/MyExtension.zip)

It can take a few seconds for the file to fully upload and show as the above. Once it is like shown above, click "Comment" and let the bot do the rest!

@github-actions github-actions Bot added the ✨ New extension A new extension label Apr 25, 2026
@github-actions github-actions Bot requested a review from a team as a code owner April 25, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ New extension A new extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant