How to Make AI workflows in ROBLOX Studio

Someone recently asked me a question about how to use AI to do workflows. So I would like to share some insights about executing workflows via the command line in ROBLOX studio.
You can have an AI automatically do a workflow such as writing code and placing them into modules. You can only do this in studio via the command line, an example of how to write code into a module via a function is.

local function WriteAiCodeToModule(input)
local module=Instance.new("ModuleScript")
local startstr=[[
module={}
]]
local endstr=[[
return module
]]
module.Source=startstr..input..endstr
module.Parent=game.ReplicatedStorage

end

Then you would just ask the AI to write the code and find the section where the code is implied perhaps the pattern “```”, AI assistants are very good to use to figure out how you should separate the code from the output.

Finally, a good module to use is the one called ZephyrOrpo in this open source AI agent template I recently released.

[FREE] ROBLOX Mistral 7b AI Chatbot Agent: Aware, Infinite Agents, 2000+ Emojis, 100+ Emotes, Memories , Wikipedia, 32k Context [Open Sourced] - Resources / Community Resources - Developer Forum | Roblox