XLQP Gen1

AI agent

Create the new XLQP AI agent with planning, workspace tools, permission modes, model effort, callbacks, and task controls.

AI agent

The updated AI textbox combines chat, activity steps, permission prompts, live client-visible context, and tools. Create it with Tab:AddTextbox({Ai = true}) or the CreateTextbox alias. AddXLQPGen1AI mounts the same chat implementation and also supports optional companion settings.

local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/josediaz765/XLQP-UIS/main/xlqp%20gen1"))()
local Window = Library:MakeWindow({Branding = {Name = "My Hub"}})
local Tab = Window:MakeTab({Name = "AI", Icon = "sparkles"})

local Agent = Tab:AddTextbox({
    Name = "XLQP Agent",
    Ai = true,
    Gui = true,
    Height = 620,
    PermissionMode = "Ask first",
    Effort = "Balanced",
    AgentPlanner = true,
    WorkspaceTools = true,
})

Options

OptionAccepted value and behavior
Name, Placeholder, LayoutOrderTitle, input hint, and element order.
Aitrue selects the agent instead of a normal textbox.
GuiEnables the GUI presentation.
HeightDefault 520; clamped from 360 to 760 pixels.
PermissionModeRead only, Ask first, Auto (ask for dangerous), or Allow everything. Defaults to saved service configuration, then Ask first.
EffortInstant, Balanced, or Deep. Defaults to saved configuration, then Balanced.
AgentPlannerEnabled unless explicitly false.
WorkspaceToolsControls automatic workspace-context collection. The current initialization also inherits the shared service setting.
ShowContextDetailsShows context details; inherited shared preferences may also enable it.
MultilineInputEnables multiline input; inherited shared preferences may also enable it. Use SetMultiline(false) to explicitly turn it off at runtime.
PromptTransform(prompt, textbox)May return a transformed prompt before sending.
OnResponse(response, provider, prompt, textbox)Called with the visible response after completion.

Permission modes

ModeTool behavior
Read onlyRead tools run; write, remote, delete, and execute actions are blocked.
Ask firstEvery non-read tool asks for approval.
Auto (ask for dangerous)Ordinary writes run automatically; remote, deletion, and execution actions ask first.
Allow everythingNon-read tools run without an approval prompt.

Approval offers Allow once, Allow everything this session, or Deny. These controls govern the client agent's tool calls; they do not grant access to server-only objects or unavailable script source.

Model, effort, and activity

The model menu exposes the providers bundled with the source, including its configured default Smart DevToolBox, public fallback choices, and custom-provider settings. Instant uses less planning and context; Balanced is the default; Deep collects more context and retains a longer conversation window.

Provider availability, quotas, authentication, and response quality depend on the selected service. A provider appearing in the UI does not guarantee unlimited free access.

The agent displays activity and tool status, plans, context information, usage estimates, and permission decisions. The interface also includes cancellation, questions, menus, and conversation controls. These are task summaries and results, not a transcript of hidden model reasoning.

Built-in tools

ToolRiskPurpose
instance_treereadReads a bounded instance tree under a path.
find_instancesreadSearches client-visible instances by name or class.
inspect_instancereadInspects a path or previously registered instance ID.
list_remotesreadLists client-visible RemoteEvents and RemoteFunctions.
read_script_sourcereadReads LocalScript or ModuleScript source only when the runtime exposes it.
set_propertywriteChanges one writable property.
fire_remoteremoteInvokes a visible remote with explicit arguments.
destroy_instancedeleteDestroys one client-visible instance.
Agent:SetPermissionMode("Read only")
print(Agent:CallTool("instance_tree", {path = "Workspace", depth = 2}))
print(Agent:CallTool("list_remotes", {limit = 20}))

Use these tools in your own experience and inspect the returned result. The agent cannot infer hidden server state from a client tree.

Controller methods

MethodResult
Send(prompt)Starts a request; returns the controller.
GetLastResponse()Returns the latest stored response.
GetTools()Returns registered tool specifications.
CallTool(name, args)Runs a registered tool through the permission policy.
SetPermissionMode(mode)Updates and saves the selected mode.
SetEffort(mode)Updates and saves model effort.
SetMultiline(enabled)Updates the input and saves that preference.
SetAgentPlanner(enabled)Toggles planning for this controller.
GetCurrentTask()Returns task name, plan, and last blocked action.
AskQuestion(spec)Displays a question with title, description, options, and optional typed input.

Companion chat

AddXLQPGen1AI forces Ai = true, defaults to Gui = true, and supports UltraAI / ultraai, CompanionEnabled, FollowEnabled, UsePlayerAnimations, BubbleResponses, ChatPromptsOnly, WorldToolsEnabled, ThemeToolsEnabled, FollowDistance, WalkSpeed, and CompanionName. Those companion preferences are shared through the AI service.

See AddXLQPGen1AI, Textbox, and the full example.