[Updated]DeterminantAI - AI Agent powered characters that you can customize!

There will be more updates coming up this weekend on tool interaction, stay tuned!

yes, if you follow closely it will continue to the next waypoint.

but the perception system can only see 50 studs now. you can change that though

thank you very much for your quick response and help, I will be tuned to the best AI system on the forum!

:loudspeaker: Hello @everyone, the plugin update(Version 240906) has been released!

  1. Pathfinding Transition to SimplePath: Huge thanks to @spoingus for the contribution! NPCs now utilize SimplePath to navigate complex terrains more effectively, ensuring smoother movements.
  2. Pre-Made Tools and Models: We’ve included some pre-made tools and models that NPCs can now interact with! Check out the server scripts under tools for examples of how to set up your tools. Feel free to DM us if you need assistance! :hammer_and_pick:
  3. Smarter Tool Usage: NPCs can now identify and differentiate between Ranged Tools and Melee Tools, using them appropriately based on the situation.
  4. Silent Mode: Introducing Silent Mode! You can now ask NPCs to “stop talking” when you don’t want them to speak. The default rules are:
    • Resume speaking only when directly prompted or when necessary based on player intent.
    • Stay silent when other players are talking, unless specifically asked to contribute.

We hope you enjoy the updates and, as always, feel free to share your feedback and suggestions. Happy developing! :rocket:

I include a video here for how to use weapons:

1 Like

Hello @everyone, quick plugin update (version 240909) is now live!

:sparkles: Bug Fix: Tool Handling Issue Resolved! We’ve fixed a bug where NPCs could accidentally “steal” your tools during gameplay.
:bulb: Introducing Custom Decision We’re excited to bring you Custom Decision, allowing NPCs to make decisions based on player input. As an example, you can create an NPC that runs a job interview, where it asks the player a series of questions and decides the outcome based on their responses.

This is the first step toward more complex interactions! While we’re starting with these decisions, this lays the groundwork for future updates where NPCs will handle more advanced scenarios, like quest-giving, complex trades, and role-based actions. Stay tuned as we build on this!

Showcase : Custom Decision for NPC Hiring
NPCs can now make decisions based on player input, such as job interviews. Here’s a quick breakdown:

  1. Enable Custom Decision(in AgentController): sets up the decision-making process with options and a description about how to make decision.
    2. Handle Decision Changes: listens for the decision outcome and handles what happens when a player is hired or rejected.


1 Like

It’s really cool to add this to your games, and it’s great to talk to, but if it’s an action NPC, there are some issues with the vision, when the NPC is holding a weapon and you want it to shoot, it misses if the target is moving, and when you say “you missed, shoot it again” it shoots at the same spot.

Hey, thanks for trying it out! Just wanted to share that a more powerful perception/sensor system is currently under development – it will be able to track moving objects in real-time.

i may as well use it for my upcoming game as a guide or smt, it looks really cool and i could use the plugin to give players good tactics or directions to areas.

1 Like

the plugin has been updated with improvement in guiding process, ima put together a few other features and make an announcement hopefully before thanksgiving. Thanks everyone for supporting

Quick Question: can I use the chatGPT code so I could use it on some other projects? I am currently making my self a AI Simulated Player on MCPE. So I’m kind of of curious.

Roblox changed their chat api so the chat bubbles won’t appear when speaking to an npc.

1 Like

yeah noticed that too. pathfinding also has a new algorithm. working on including them in the plugin.

yes you can repurpose the DecisionModule if you have your own chat UI. But it should only be sent from roblox.

.DeterminantSDK.PluginMain:1134: attempt to index nil with 'FindFirstChild'  -  Edit
  15:20:58.748  Stack Begin  -  Studio
  15:20:58.748  Script 'cloud_15433337117.DeterminantSDK.PluginMain', Line 1134  -  Studio
  15:20:58.748  Stack End  -  Studio

This should get fixed now. Still actively working on updates. Apologies for any intermittent issues this might cause

Thank you! But I ran into a issue. A couple of them.
image
image
and sometimes it would work but after my messages would be the greeting messages.
heres my code:

local replicatedStorage = game:GetService("ReplicatedStorage")
local Modules = replicatedStorage:WaitForChild("Modules")
local decisionModule = require(replicatedStorage:WaitForChild("Modules").DecisionModule)

local function generateActionConfig(agentType)
	if agentType == "Conversation Agent" then
		return {
	{
		["type"] = "function",
		["function"] = {
			name = "expressEmotion",
			description = "Display a gesture reflecting your current mood.",
			parameters = {
				type = "object",
				properties = {
					mood = {
						type = "string",
						description = "The mood to express.",
						enum = {"welcoming", "agreeable", "disagreeable", "pensive", "amused"}
					},
					reason = {
						type = "string",
                    	description = "Explain why you're expressing this emotion"
					}
				},
				required = {"mood", "reason"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "getSurroundingInfo",
			description = "Gather information about nearby objects, locations, and coordinates. Always call this before attempting to move or interact with the environment.",
			parameters = {
				type = "object",
				properties = {
					reason = { type = "string", description = "The reason." }
				},
				required = {"reason"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "getCharacterState",
			description = "Get your current state, including health, position, and inventory. Call this before using tools or when you need self-information.",
			parameters = {
				type = "object",
				properties = {
					character = { type = "string", description = "The name of the character as a string. The function will attempt to find this character in the game environment." },
					reason = { type = "string", description = "Explain why you need this information." }
				},
				required = {"character", "reason"}
			}
		}
	},
}
	elseif agentType == "Action Agent" then
		return {
	{
		["type"] = "function",
		["function"] = {
			name = "moveToLocation",
			description = "Move to a specific location or object. Use this for movement and grabbing objects. Must call getSurroundingInfo first to obtain valid coordinates.",
			parameters = {
				type = "object",
				properties = {
					destination = {
						type = "object",
						description = "The destination you will move towards",
						properties = {
							name = {
								type = "string",
								description = "The actual destination name, must come from nearby models or objects"
							},
							x = {
								type = "integer",
								description = "The X coordinate of the destination"
							},
							y = {
								type = "integer",
								description = "The Y coordinate of the destination"
							},
							z = {
								type = "integer",
								description = "The Z coordinate of the destination"
							}
						},
						required = {"name", "x", "y", "z"}
					},
					reason = {
						type = "string",
						description = "The reason for moving to this location, providing context such as 'taking a seat', 'approaching an object', or 'engaging with an environment feature'"
					}
				},
				required = {"destination", "reason"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "setFollowState",
			description = "Immediately set the follow state for a player without questioning or checking. Do not use moveToLocation for this action.",
			parameters = {
				type = "object",
				properties = {
					follow = {
						type = "boolean",
						description = "The follow state to set (true or false)"
					},
					playerName = {
						type = "string",
						description = "The name of the player to follow"
					},
					reason = {
						type = "string",
						description = "The reason of taking this action, especially why follow the player"
					}

				},
				required = {"follow", "playerName"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "activateTools",
			description = "Use a tool from your inventory or one you are holding. Must grab the tool first. Must call getCharacterState first to verify you have the tool. Must call this instead of describing tool use.",
			parameters = {
				type = "object",
				properties = {
					toolName = {
						type = "string",
						description = "The name of the tool to use, must be verified by calling getCharacterState, grab it by calling moveToLocation"
					},
					targetPosition = {
						type = "object",
						description = "if you are using a tool on something, check for coordinates first",
						properties = {
							name = {
								type = "string",
								description = "The actual target name, must come from nearby models or objects"
							},
							x = {
								type = "integer",
								description = "The X coordinate of the target"
							},
							y = {
								type = "integer",
								description = "The Y coordinate of the target"
							},
							z = {
								type = "integer",
								description = "The Z coordinate of the target"
							}
						},
						required = {"x", "y", "z"}
					},

					reason = {
						type = "string",
						description = "The reason of using this tool"
					}

				},
				required = {"toolName", "reason", "targetPosition"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "guidePlayerToLocation",
			description = "Guide a player to a specific location. Call getSurroundingInfo first to get coordinates.",
			parameters = {
				type = "object",
				properties = {
					playerName = {
						type = "string",
						description = "The name of the player that needs guidance"
					},
					destination = {
						type = "object",
						description = "The destination coordinates",
						properties = {
							x = { type = "integer", description = "The X coordinate of the destination" },
							y = { type = "integer", description = "The Y coordinate of the destination" },
							z = { type = "integer", description = "The Z coordinate of the destination" }
						},
						required = {"x", "y", "z"}
					},
					guidanceMessage = {
						type = "string",
						description = "The message to communicate to the player before guiding them, e.g., 'Follow me to your seat'"
					},
				},
				required = {"playerName", "destination", "guidanceMessage"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "expressEmotion",
			description = "you want to displays gestures that best reflect the your mood.",
			parameters = {
				type = "object",
				properties = {
					mood = {
						type = "string",
						description = "The mood to be expressed.",
						enum = {"welcoming", "agreeable", "disagreeable", "pensive", "amused", "tired"}
					},
					reason = {
						type = "string",
						description = "The reason."
					}
				},
				required = {"mood", "reason"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "getSurroundingInfo",
			description = "Gather information about nearby objects, locations, and coordinates. Always call this before attempting to move or interact with the environment.",
			parameters = {
				type = "object",
				properties = {
					reason = { type = "string", description = "The reason." }
				},
				required = {"reason"}
			}
		}
	},
	{
		["type"] = "function",
		["function"] = {
			name = "getCharacterState",
			description = "Get your current state, including health, position, and inventory. Call this before using tools or when you need self-information.",
			parameters = {
				type = "object",
				properties = {
					character = { type = "string", description = "The name of the character as a string. The function will attempt to find this character in the game environment." },
					reason = { type = "string", description = "The reason for retrieving the character's state, which helps in logging and debugging purposes." }
				},
				required = {"character", "reason"}
			}
		}
	},

}
	end
end

local action = generateActionConfig("Conversation Agent");

local bot = decisionModule.new(action)

local messages = {
	{
		["role"] = "system",
		["content"] = "You are an AI that helps with people."
	}
}

game.Players.PlayerAdded:Connect(function(plyr)
	plyr.Chatted:Connect(function(msg)
		local userMsg = {
				["role"] = "user",
				["content"] = msg
			}

		table.insert(messages, userMsg)
		print(messages)
		local _, response = bot:GetDecision(userMsg, messages)
		print(_)
		print(game:GetService("HttpService"):JSONDecode(response["content"])["message"])
	end)
end)

change your usermsg to this:

		local userMsg = {
			["role"] = "user",
			["text"] = msg
		}

there could be other errors since actions can not be used in your ui. let me update the script so you can set it to nil

okay.Thank you very much!
onlyhatethisstupidmax30chars