{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":22625,"path":"intelligent-experiences/add-desktop-action-ai-agent.md","title":"Add a defined desktop action tool to an AI agent for desktop and web-based task","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add a defined desktop action tool to an AI agent for desktop and web-based task\n\nAdd a desktop action as a tool to an AI agent in AI Agent Studio so that AI agents can execute defined path desktop actions for repetitive tasks in desktop and web environment.\n\n## Before you begin\n\nFamiliarize yourself with defined path desktop actions. For more information, see [Defined desktop actions for desktop and web-based tasks](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/desktop-actions.md) and [Defined desktop actions in AI Desktop Actions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/desktop-actions-designer-workspace-ad.md).\n\nRole required: sn\\_aia.admin\n\n## About this task\n\nDesktop actions are tools that AI agents use to interact with web and desktop applications. When you configure an AI agent and select desktop action as a tool, you define whether the AI agent follows a defined path \\(fixed steps designed in AI Desktop Actions\\) or an adaptive path \\(high-level goal described in the tool configuration\\). Unlike adaptive path desktop actions that dynamically plan execution, defined path desktop actions enable AI agents to execute preconfigured workflows through a fixed sequence of steps.\n\nDefined desktop actions are further categorized into on-screen tasks and background tasks.\n\n-   **On-screen tasks**: These actions help you simulate humans interacting with UI elements on your thick client applications, legacy systems, or SaaS applications without APIs. These actions include clicking buttons, typing into text boxes, selecting from drop-down menus, and more. They encapsulate repeatable UI interactions, such as screens, anchors, and steps. You can create, manage, and test your desktop actions in AI Desktop Actions.\n-   **Background tasks**: These actions include prebuilt connectors that enable your AI agents to interact with various applications and system components in the background. These connectors streamline automation by offering actions for common tasks, reducing the need for complex scripting. Each connector focuses on a specific application or system area, providing a collection of related methods. You can't create background tasks actions.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **AI Agent Studio** &gt; **Create and manage** &gt; **AI agents**.\n\n2.  Open the AI agent that you want to add a desktop action to.\n\n    For creating an AI agent, see [Create an AI agent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/configure-next-best-action-agent.md).\n\n3.  Navigate to the Add tools and information step.\n\n4.  In the **Add tool** drop-down list, select **Desktop action**.\n\n    \\[Omitted image \"create-web-tool4.png\"\\] Alt text: Add tool drop-down showing desktop action as an option.\n\n5.  Select or create a desktop action.\n\n<table id=\"table_jqm_b34_bjc\"><thead><tr><th>\n\nExisting desktop action\n\n</th><th>\n\nNew desktop action\n\n</th></tr></thead><tbody><tr><td>\n\n1.  Select an existing desktop action of type on-screen task or background task from the **Select a desktop action** drop-down list.\n\nThe background task desktop actions are supported for the following applications:\n\n    -   Microsoft Excel\n    -   Microsoft Outlook\n    -   Microsoft Word\n    -   PDF\n    -   PowerShell Connector\n    -   SQL\n    -   SSH\n    -   SystemAction\n2.  Select **Continue**.\n\n\n</td><td>\n\n1.  On the Add a desktop action modal, select the **Click here to create a desktop action** link.\n\n\\[Omitted image \"create-web-tool5.png\"\\] Alt text: Add web-based desktop actions\n\n2.  Select the option **Record a fixed sequence of steps for desktop and web-based tasks**.\n3.  Select **Open AI Desktop Actions app**.\n\nRecord or manually capture the desktop action in AI Desktop Actions Windows application, activate it, and then come back here to add it as a tool. For more information, see [Defined desktop actions in AI Desktop Actions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/desktop-actions-designer-workspace-ad.md).\n\nThe creation process of defined desktop actions ends here.\n\n</td></tr></tbody>\n</table>6.  On the form, fill in the fields.\n\n<table id=\"table_bz1_zcr_ygc\"><thead><tr><th>\n\nFields\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nDesktop action description\n\n</td><td>\n\nRead-only. Description of the desktop action or application that you selected.\n\n</td></tr><tr><td>\n\nApplications\n\n</td><td>\n\nRead-only. Applications that this desktop action interacts with.**Note:** This field appears only when **On-screen task** desktop action is selected.\n\n</td></tr><tr><td>\n\nCreated by\n\n</td><td>\n\nRead-only. User who created the desktop action.**Note:** This field appears only when **On-screen task** desktop action is selected.\n\n</td></tr><tr><td>\n\nLast updated\n\n</td><td>\n\nRead-only. Date when this desktop action was last updated.**Note:** This field appears only when **On-screen task** desktop action is selected.\n\n</td></tr><tr><td>\n\nInputs\n\n</td><td>\n\nRead-only. Input parameters associated with this desktop action.**Note:** This field appears when a desktop action or application is selected from the list.\n\n</td></tr><tr><td>\n\nOutputs\n\n</td><td>\n\nRead-only. Output parameters associated with this desktop action. **Note:** This field appears when a desktop action or application is selected from the list.\n\n</td></tr><tr><td>\n\nName\n\n</td><td>\n\nName that you want to specify for your selected desktop action.\n\n</td></tr><tr><td>\n\nTool description\n\n</td><td>\n\nDescription of the desktop action tool and what it’s going to do to assist your AI agent.**Note:** This description is sent to the large language model \\(LLM\\).\n\n</td></tr><tr><td colspan=\"2\">\n\nMap parameters**Important:**\n\nIf you update a desktop action after mapping its inputs in AI Agent Studio, the agent continues to use the previous mapping until you reopen the tool configuration and save it again.\n\nIf you rename an input in the desktop action, the agent treats it as a new input and the existing mapping for that input is removed. You must remap the renamed input before the desktop action can be saved.\n\n</td></tr><tr><td>\n\nStep name\n\n</td><td>\n\nRead-only. The name of the step that is configured to use a parameter.**Note:** This field appears only when an **On-screen task** desktop action with inputs configured for parameters is selected.\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nRead-only. The description entered for the step that is configured to use a parameter.**Note:** This field appears only when an **On-screen task** desktop action with inputs configured for parameters is selected.\n\n</td></tr><tr><td>\n\nParameter record\n\n</td><td>\n\nSelect the Desktop action parameter record that the AI agent must use to retrieve the value for this step at execution time. Mapping a parameter record is required for all steps before the desktop action can be saved. **Note:** This field appears only when an **On-screen task** desktop action with inputs configured for parameters is selected.\n\nThe same parameter record can be mapped to multiple steps. Each step can only be mapped to one parameter record.\n\n</td></tr><tr><td>\n\nExecution mode\n\n</td><td>\n\nMode of execution for your selected desktop action:-   **Supervised**: Inputs from your live agent are required during the execution of this desktop action while the AI agent runs.\n-   **Autonomous**: Doesn't require any input from your live agent during the execution of this desktop action while the AI agent runs.\n\n\n</td></tr><tr><td>\n\nDisplay output\n\n</td><td>\n\nPermission to display the output of the execution in the ServiceNow Otto panel or in Virtual Agent:-   **Yes**\n-   **No**\nIf you want the AI agent to work in Off Glide architecture with Premium Chat experience, you must turn-on the **Display output** toggle. When the toggle is turned-on, you can add widgets that can be used in assistants built with Premium Chat experiences. The widget configuration includes:\n\n-   **Widget**: Defines the display output to render the content in a better user experience. You can select the widget from the drop-down.\n-   **Require widget transformation**: An additional LLM call is required to transform the raw tool. If you choose to skip this transformation step, the tool output will be directly mapped to the widget.\n    -   **Yes**\n    -   **No**\n-   **Display refined widget message**: Refines the widget message when configured.\n    -   **Yes**\n    -   **No**\n**Note:** The display output as a toggle is exclusively available for the Premium Chat experience when the Off Glide Conversation Server plugin \\(com.glide.cs.offglide\\) is installed. If the plugin is not installed, you will continue to access the standard display output options.\n\n</td></tr><tr><td colspan=\"2\">\n\nAdvanced settings\n\n</td></tr><tr><td>\n\nSelect an output transformation format\n\n</td><td>\n\nStyle for the LLM to present the results as it passes information between tools and to other agents. Out transformation formats:-   None\n-   Concise\n-   Paragraph\n-   Summary\n-   Custom\n\n\n</td></tr><tr><td>\n\nWrite processing messages for users\n\n</td><td>\n\nMessage to display to users during tool execution.-   In-progress message: Write an in-progress message to be displayed to end-users while the tool is running.\n-   Completion message: Write a completion message to be displayed to end-users once the tool finishes running.\n\n\n</td></tr></tbody>\n</table>7.  Select **Add desktop action**.\n\n    The desktop action is added in the Desktop actions list on the Add tools and information page.\n\n\n## What to do next\n\nFor more information about executing desktop actions, see [Examples of executing desktop actions using AI agents](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/intelligent-experiences/use-agentic-desktop.md).\n\n"}}