AeThex-Engine-Core/engine/modules/aethex_ai
MrPiglr 9dddce666d
🚀 AeThex Engine v1.0 - Complete Fork
- Forked from Godot Engine 4.7-dev (MIT License)
- Rebranded to AeThex Engine with cyan/purple theme
- Added AI-powered development assistant module
- Integrated Claude API for code completion & error fixing
- Custom hexagon logo and branding
- Multi-platform CI/CD (Windows, Linux, macOS)
- Built Linux editor binary (151MB)
- Complete source code with all customizations

Tech Stack:
- C++ game engine core
- AI Module: Claude 3.5 Sonnet integration
- Build: SCons, 14K+ source files
- License: MIT (Godot) + Custom (AeThex features)

Ready for Windows build via GitHub Actions!
2026-02-23 05:01:56 +00:00
..
api 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
ai_assistant.cpp 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
ai_assistant.h 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
ai_code_completion.cpp 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
ai_code_completion.h 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
config.py 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
README.md 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
register_types.cpp 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
register_types.h 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00
SCsub 🚀 AeThex Engine v1.0 - Complete Fork 2026-02-23 05:01:56 +00:00

AeThex AI Module - README

Overview

The AeThex AI module provides AI-powered development assistance directly in the engine, including code completion, error detection, and documentation generation.

Features

  • Code Completion: AI-powered GDScript code suggestions
  • Error Fixing: Intelligent error detection and fix suggestions
  • Documentation: Auto-generate function and class documentation
  • Natural Language: Convert descriptions to working code

Usage

GDScript Example

extends Node

func _ready():
    # Initialize AI assistant
    var ai = AIAssistant
    ai.initialize("your-api-key-here")
    
    # Get code completion
    var code = "func _process(delta):"
    var completion = ai.get_code_completion(code, [])
    print(completion)
    
    # Explain code
    var explanation = ai.explain_code("func _ready(): pass")
    print(explanation)
    
    # Fix an error
    var fixed = ai.fix_error("Invalid syntax", "func test()\n\tpas")
    print(fixed)

Configuration

Set your Claude API key in project settings:

Project → Project Settings → AeThex → AI → API Key

Or via code:

AIAssistant.set_api_key("your-api-key")

API Reference

AIAssistant (Singleton)

Main AI assistant class accessible globally.

Methods:

  • initialize(api_key: String) -> Error - Initialize with API key
  • is_initialized() -> bool - Check if initialized
  • get_code_completion(context: String, recent_code: PackedStringArray) -> String
  • explain_code(code_block: String) -> String
  • fix_error(error_message: String, code_context: String) -> String
  • generate_function_docs(function_signature: String) -> String
  • natural_language_to_code(description: String, context: String) -> String
  • clear_cache() - Clear response cache

AIAPIClient

Low-level API client for Claude API.

Methods:

  • initialize() -> Error
  • send_completion_sync(prompt: String, timeout: float) -> String
  • set_api_key(key: String)
  • set_model(model: String)

AICodeCompletion

Code completion helper (editor integration coming soon).

Methods:

  • get_suggestions(code: String, cursor_position: int) -> PackedStringArray
  • set_enabled(enabled: bool)
  • set_suggestion_delay(delay: float)

Building

The module is automatically included when building AeThex Engine:

cd engine
scons platform=linuxbsd target=editor

To disable the module:

scons platform=linuxbsd target=editor module_aethex_ai_enabled=no

Requirements

Privacy

  • Only sends relevant code context to API (not entire project)
  • Responses are cached locally
  • API key is stored securely
  • Opt-in only - disabled by default

Troubleshooting

"Not initialized" error:

  • Make sure to call AIAssistant.initialize() with a valid API key

No response:

  • Check internet connection
  • Verify API key is valid
  • Check API rate limits

Slow responses:

  • Responses are cached after first request
  • Typical response time is 1-5 seconds
  • Consider adjusting timeout values

Future Enhancements

  • Async API calls with callbacks
  • Editor UI panel
  • Real-time code completion
  • Multi-file context awareness
  • Local AI model support
  • Voice commands

License

Copyright (c) 2026-present AeThex Labs Based on Godot Engine (MIT License)