AI Chat
Configure context-aware AI Chat, control access to agents and tools, and review stored chat history in PowerShell Universal.
AI Chat is a context-aware assistant in the PowerShell Universal admin console. It lets an authorized user select an AI agent, ask it to inspect or update the current resource, review its tool activity, and receive a streamed response. Chat is available on console pages that provide an editable resource context, such as scripts, apps, APIs, schedules, and portal components.
How it works
The chat panel passes the current resource type, resource identifier, repository scope, and primary file to the selected AI agent. The agent receives instructions to stay within that scope and can use its configured tools to inspect, update, and reload the resource.
A chat session has a conversation ID. Clear chat starts a new conversation in the console. The session activity panel shows tool calls and file changes made during the current session.
Configure AI Chat
Create an AI agent under Build > AI > Agents. Configure its provider, model, endpoint, credential, instructions, and any AI Tools it may call.
Enable Available in Chat for the AI agent.
Assign roles to the AI agent when only particular users should be allowed to select it. An agent without assigned roles is available to all users who have chat permission.
Grant users the Chat
ReadorWritepermission. Users must also satisfy the selected agent's role requirements and any role requirements of the resource they are editing.
If no eligible AI agent is enabled for chat, the chat panel remains unavailable to the user.
Who can use chat
A user can use AI Chat only when all of the following conditions are met:
The user has Chat
ReadorWritepermission.At least one AI agent has Available in Chat enabled.
The user has a role allowed by that AI agent, when the agent has role restrictions.
The user is authorized to access the current resource.
Chat permissions control use of the panel. AI agent roles control which enabled agents a user can select.
Tools available to AI Chat
The selected AI agent can call the custom AI Tools configured on that agent. These tools run with their configured script, timeout, and run-target settings.
AI Chat also provides context-aware built-in tools for users who have the Administrator, Operator, or App Editor role and Chat Read or Write permission. The available tools depend on the current resource and permission level.
Discover resources and read repository files
Yes
Yes
List resources, notifications, files, file content, and command help
Yes
Yes
Reload the current resource
No
Yes
Create, update, move, or delete repository files
No
Yes
Inspect a configured GET endpoint for an app
App context only
App context only
Search portal control properties
Portal-component context only
Portal-component context only
Built-in file operations are restricted to the current resource's repository scope. They cannot traverse outside that scope.
Chat history and retention
PowerShell Universal stores chat history in its database. Each record includes the conversation and selected agent, user, resource context, messages, token usage, and each tool-call's name, arguments, result, error, status, and timestamps.
Users with Chat History Read permission can review persisted conversations from Build > AI > Chat History. History is retained according to the general GroomDays setting and is deleted when it becomes older than that retention period. Consider this retention policy when prompts or tool arguments may contain sensitive information.
Related pages
Was this helpful?