Quick Start
Learn about the Godot integration in Neocortex
The Neocortex Godot SDK is an editor plugin that allows you to easily integrate Neocortex Smart NPCs and Virtual Assistants into your Godot project. It provides GDScript nodes and classes that mirror the Unity SDK's API, including chat, voice, chat history, event logging, and usage endpoints.
Beta
The Godot SDK is currently in beta. Follow Neocortex on GitHub for the public release announcement.
Requirements
- Neocortex account Sign Up Here
- Godot 4.x Download Here
Talking to Your First Character
Installation
- Copy the
addons/neocortex-godot-sdkfolder into your project'saddonsdirectory - Go to
Project>Project Settings>Plugins - Enable the
Neocortex Godot SDKplugin
After enabling the plugin, a Neocortex dock will appear in the editor.
API Key Setup
To start using the Neocortex SDK, you need to initialize it with your Neocortex API key. You can create a new API key from the Neocortex web platform by going to the API Keys page.
- Create a new API key and copy it
- Open the
Neocortexdock in the Godot editor - Paste the API key into the
API Keyfield, it is saved automatically
Add a Smart Agent
- Add a
NeocortexSmartAgentnode to your scene - Create a new project in the Neocortex web platform and copy the project ID from the URL
- Paste the project ID into the agent's
Character Idproperty in the Inspector
Create a Control Script
Connect to the agent's signals and send your first message:
extends Node
@onready var agent: NeocortexSmartAgent = $NeocortexSmartAgent
func _ready() -> void:
agent.chat_response_received.connect(_on_chat_response)
agent.request_failed.connect(_on_request_failed)
agent.text_to_text("Hello, Neocortex!")
func _on_chat_response(response) -> void:
print("NPC: ", response.message)
func _on_request_failed(error: String) -> void:
push_error(error)Add Voice (Optional)
For voice output, use text_to_audio and play the returned stream:
@onready var player: AudioStreamPlayer = $AudioStreamPlayer
func _ready() -> void:
agent.audio_response_received.connect(_on_audio_response)
agent.text_to_audio("Hello, Neocortex!")
func _on_audio_response(audio) -> void:
player.stream = audio
player.play()For voice input, record the microphone into an AudioStreamWAV (see Godot's AudioEffectRecord) and send it with audio_to_text or audio_to_audio.
Congratulations! You have successfully set up the Neocortex Godot SDK and interacted with your first Smart NPC.
UI Nodes
The plugin ships with ready-made UI scenes under addons/neocortex-godot-sdk/nodes that you can instance in your own scenes:
| Scene | Description |
|---|---|
NeocortexChatPanel | Scrollable panel displaying the chat messages between the user and the agent. |
NeocortexMessage | A single chat message entry, aligned and colored by sender. |
NeocortexMicrophoneDropdown | Dropdown to select the microphone device. |