Using the Task Library, add AI prompt tasks to a playbook.
AI prompt tasks enable automated interaction with the Cortex Cloud built-in Large Language Model (LLM) as a single step in a playbook. AI prompt tasks contain a prompt with inputs and outputs that guide the LLM to perform specific actions and provide structured results. For example, you can use an AI prompt task to prompt the LLM to identify malware categories.
You can add the same AI prompt task more than once to a playbook, and each instance will have its settings saved locally to that specific task.
From the Task Library, you can choose system (built-in) AI prompt tasks that contain well-defined prompts for common use cases. You can duplicate and edit these tasks, or create a custom AI prompt task based on your needs.
The following are examples of available system AI-based tasks.
Task name | Inputs | Outputs | Prompt |
|---|---|---|---|
IssueSummaryAndRemediation | issue The issue details which will be sent to the LLM for summarization. | llm.summary The LLM output summary. | |
MalwareReportSummary | report_id The report ID which will be sent to the LLM for summarization. | llm.summary The LLM output summary. | |
VulnerabilityReportSummary | report_id The report ID which will be sent to the LLM for summarization. | llm.summary The LLM output summary. |
Add system AI prompt tasks
System AI prompt tasks come with pre-defined prompts, inputs, and outputs that are non-editable and cannot be removed, you can only set the inputs with issue context or specific values. If you need to change a system task, you can duplicate it from the AI Prompts page and then edit the copy.
From the Task Library pane, click AI Prompt.
In the System tab, find the relevant built-in AI prompt task from the list.
Use free text in the search box to find a prompt.
Select the AI prompt task you want and drag the task onto the playbook editor.
The Task Details pane opens, and the Task Type is automatically set to
AI Task.Configure the relevant AI prompt task parameters.
Click OK.
Connect the system AI prompt task you added by dragging and dropping a wire.
If you need to perform different actions based on the AI prompt task results, add a conditional task immediately after the AI prompt task in the playbook.
Add custom AI prompt tasks
You can create or edit a custom AI prompt task or edit a duplicated system AI prompt.
From the Task Library pane, click AI Prompt.
In the System tab, select Local AI Prompt to create a new AI prompt task.
Or in the Custom tab, search for an existing custom AI prompt tasks or select Local AI Prompt to create a new AI prompt task. If you want to use an existing custom AI prompt task, drag it onto the playbook editor.
Note
Selecting Local AI Prompt creates a local version of the task within your playbook. Any future updates made to the Prompts Library will not sync to this specific task.
Choose Local AI Prompt if you need to customize the logic for a specific workflow and want to ensure its behavior remains unchanged, even if the Prompts Library is updated with improvements such as refined prompt engineering, security patches, and model optimizations.
In the Task Details pane, configure the AI prompt task.
Set the AI prompt task name.
The AI prompt task name must start with a letter. Spaces and special characters are not supported.
Set the AI prompt task parameters.
Click Save.
The AI prompt task appears in the playbook editor.
Connect the task you've added by dragging and dropping a wire.
If you need to perform different actions based on the AI prompt task results, add a conditional task immediately after the AI prompt task in the playbook.
Click Save Playbook.
AI prompt task error handling
It is recommended to configure error handling, which can include specifying a return value in case the AI prompt task fails. Potential errors include the LLM not being responsive (timeout), the LLM returning an invalid output, exceeding a threshold, or the LLM being turned off.
The reason for failure is logged in the War Room.
Tip
If an AI prompt task returns a 504 Error with the status DEADLINE_EXCEEDED, it is likely due to the task requiring more time to process than the default setting allows. To resolve this, open the Task Details pane of the AI task and select the Advanced tab, then increase the Execution timeout (seconds) based on how complex your prompt is and how long you expect the AI response to be. For example, for complex tasks such as generating a full vulnerability report, you many need to increase the timeout from the 10 second default to 120 seconds or higher.