You can add commands as tools to AIP agents, enabling the agent to interact with and act on behalf of a user in Palantir applications. Commands run directly in the user's application, giving them access to the current application state and screen. This enables integrations that traditional backend tools struggle to support. For example, the agent can use commands to navigate the user interface, like setting the view to a specific location on a map.
You can also configure Workshop's Button Group, Metric Card, and App Pairing widgets to trigger operations in any application that produces commands.
Agents can use commands as tools once an application declares and produces the command. To add commands as tools to an agent, select Add tool > Commands from the Agent configuration panel.

Search for and select one or multiple commands from the Search commands... modal. You can select a command multiple times if you need to configure distinct prompts for each instance of that command. Add the selected commands to your agent and apply configurations as needed.
AIP Agents that use commands as tools have a retention window that is automatically set to expire after 24 hours of inactivity.
The ability to configure a command used as an agent tool is in the beta phase of development. Its supporting interface may change during active development. Contact Palantir Support with questions about configuring commands as tools in AIP Agent Studio.
After you add one or multiple commands as tools to your agent, you can select a command to open a modal with additional configurations the agent uses to inform its actions. Select Show more to render additional documentation to help you learn more about each tool's optional configuration settings, such as its input parameters and expected behavior when invoked.

Review the sections below to learn more about additional configuration options.
Provide command-specific context in addition to the default documentation made available to help the agent's backing model understand the action it will execute. While each command contains default documentation that helps the agent use it as a tool, you can provide more detail in Additional documentation to help the agent decide precisely when and how it should call the tool. As an example, you can instruct the Remove all features command to remove ephemeral features before drawing a new one if the existing features are not related to the new in a certain manner.
Some commands accept input parameters when you configure them as a tool. Use Input parameters to set input values for command parameters, such as Fill pattern or Stroke width for the Draw polygon command.
By default, the agent determines the value of all required parameters based on your Instructions and the user's prompt. For optional parameters, the agent may optionally determine the value based on your Instructions and the user's prompt.
To override the default behavior, select Add parameter override, choose the parameter you want to override, and configure it using one of the following override options:
Enabled by default, your agent will ask a user to review the command payload data and either Reject or Approve the command's action or output from their prompt before the command is executed. When disabled, your agent will execute commands based on a user's prompt without manual approval intervention.

After you configure your commands in AIP Agent Studio, you can follow the instructions below to test your agent and validate its configurations before you save and publish to make it available in production applications:

Once you are satisfied with your agent's configurations, publish the agent for use as an assistant embedded in AIP Assist or through Workshop within the AIP Agent widget.
An agent will ignore commands as tools if you publish it as a function and execute it from an environment that does not support commands, such as configuring it to run within an automation built in Automate. Contact Palantir Support with questions about your environment.
Through App Pairing, your agent will automatically discover other applications you have open in your browser. To pair your agent with multiple application instances, select Add next to the Discovered application to create a pairing Group.

If your agent is not paired with an application to execute a command, then it will prompt the user to select an application to pair.
While you can use AIP Agent Studio with your paired application to test your agent's performance, you should embed the agent in a Workshop module or AIP Assist panel for a streamlined user experience. In both cases, the agent will automatically pair to the application with which it interacts.
To make your agent accessible to AIP Assist, choose the rocket icon on the left side of your screen in AIP Agent Studio to launch the Usage panel before selecting the AIP Assist toggle. Next, select Publish on the top right of your screen. This will deploy the latest published agent version to AIP Assist, after which you will be able to select it from the Chat with an AIP Agent menu in an AIP Assist chat panel.

Once you select the agent, AIP Assist will automatically pair with the target application, and all relevant commands configured as tools will target the application. If your agent contains tools for multiple applications but is not paired with those applications, then AIP Assist will prompt you to choose an application to pair in one of your open browser tabs.
Use Workshop's AIP Agent widget to embed your agent in a module, where you can also use the Iframe widget to embed one or more applications within sections adjacent to the AIP Agent widget. An AIP Agent widget and an iframe-embedded application in a Workshop module will automatically pair, and all relevant commands you configure as tools will target the iframe-embedded application.