Modify existing ServiceNow applications using natural language prompts with Build Agent.
Before you begin
Install and enable Build Agent. For more information, see Install Build Agent.
For some prompting guidelines and ideas, see Example prompts.
Role required: admin
About this task
You can edit an application with Build Agent in both ServiceNow Studio and the ServiceNow IDE. If you're using the ServiceNow IDE, the application must be open in your workspace. You can add it to the workspace in the following ways:
Applications created with Build Agent are automatically added to the workspace in which they were created. They can also be opened in other workspace in the ServiceNow IDE.
For applications that were not developed using the ServiceNow IDE, ServiceNow Studio, or the ServiceNow SDK, you must convert them into Fluent format to enable development within the Build Agent. You can prompt the Build Agent to use the open app tool to locate the application you want. Alternatively, you can search for an application directly within the Build Agent, and it will automatically use the open app tool. The open app tool can find an application, convert it to Fluent format, and then add the converted app to your workspace.
Navigate to All > App Development > ServiceNow Studio.
You can also open Build Agent in the ServiceNow IDE if you prefer a more code-centric experience.
The Build Agent chat panel opens by default in new ServiceNow Studio sessions. If the panel isn't open, select Open Build Agent from the status bar in the lower corner of your browser. Figure 1. Open Build Agent
Select Update an app in the chat panel.
Figure 2. Update an app in Build Agent
Select the application that you want to edit and select the Submit button.
Applications converted into ServiceNow Fluent code appear in the Application list.Figure 3. Select the app to edit
Describe what you want to change in the application in plain language.
Build Agent can provide you with some suggestions, such as Update a table or add/modify fields.
Select the Send icon .
Build Agent starts updating the application.
Review the changes in the Change Log in a tab in ServiceNow Studio and continue iterating to refine the app.
Review updates to generated tables, flows, and scripts, and preview any user interfaces created in your application. You can interact with the preview to make additional
edits, for example, select a button in the Preview tab and tell Build Agent to Change the color of the button to purple.
Approve the changes:
If prompted, select Review all edits to view the changes.
If you’re happy with the changes, select Approve plan.
Optional: Prompt and ApproveBuild Agent to build and deploy the application to an update set if it doesn't do so automatically.
Result
The application is built and installed.
Note:
Even though this process is standard, be sure to follow the on-screen instructions, as the Build Agent functions interactively.
If you want to view source code, open the ServiceNow IDE and select the File Explorer view from the Activity bar. The ServiceNow Fluent application code and other source code in the src directory appears.Figure 4. App code in the ServiceNow IDE