Neocortex
IntegrationsGodot SDK

Quick Start

Install the Neocortex Godot SDK and talk to an AI character in Godot 4 by text or voice, with a ready chat scene, seven samples and a few lines of GDScript.

The Neocortex Godot SDK brings the characters you build on Neocortex into your Godot game. They talk and listen, show an emotion on every line, act in your world, chat in groups and host quizzes.

Requirements

Setup

Install the plugin

  • Download the latest release and copy its addons/neocortex-godot-sdk folder into your project's addons folder
  • Enable Neocortex in Project > Project Settings > Plugins

The plugin also turns on microphone input for you.

Paste your API key

Create a key on the API Keys page, paste it into the Neocortex dock next to the Inspector, and press Save.

The Neocortex dock

Keep your key out of Git

Add addons/neocortex-godot-sdk/neocortex_settings.tres to your .gitignore. An exported game carries its key, so set usage limits on it.

Add a chat to your scene

No code needed.

Pick Project > Tools > Neocortex > Complete Text Chat or Complete Voice Chat.

Choose your character in the new agent's character_id dropdown.

Run the scene and say hello.

Try the samples

Press Open Samples in the dock, then pick your character and microphone above the cards. See Samples for what each one shows.

The samples launcher

From code

Add a NeocortexSmartAgent, pick its character, and connect its signals:

talk_to_character.gd
extends Node

@onready var agent: NeocortexSmartAgent = $NeocortexSmartAgent

func _ready() -> void:
	agent.chat_line_started.connect(_on_line)
	agent.request_error.connect(_on_error)
	agent.text_to_text("Hello there!")

func _on_line(line: NeocortexChatLine) -> void:
	print(line.text, " (", NeocortexEnums.emotion_to_string(line.emotion), ")")

func _on_error(error: NeocortexApiError) -> void:
	if error.is_retryable():
		print("Busy, try again in a moment")
	else:
		push_error(error.message)

Each reply arrives as lines, each with its own emotion and voice. See Chat lines and Handling errors.

Voice

Put a NeocortexAudioReceiver next to the agent and run the scene. The agent listens, answers and listens again, with no script needed. To handle the recording yourself, see NeocortexAudioReceiver.

On this page