Add AI Prompt tasks
Add AI Prompt tasks to automate AI-assisted workflows.
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, 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. Each instance saves its settings locally.
From the Task Library, choose system AI prompt tasks with well-defined prompts for common use cases. Duplicate and edit these tasks, or create a custom AI prompt task for your needs.
Tip
For guidance on structuring your prompts, see Write effective prompts.
System AI prompt tasks in the Task Library
The following are examples of available system AI-based tasks.
IssueSummaryAndRemediation
issue
The issue details sent to the LLM for summarization.
llm.summary
The LLM output summary.
See the expandable prompt below.
MalwareReportSummary
report_id
The report ID sent to the LLM for summarization.
llm.summary
The LLM output summary.
See the expandable prompt below.
VulnerabilityReportSummary
report_id
The report ID sent to the LLM for summarization.
llm.summary
The LLM output summary.
See the expandable prompt below.
Add system AI prompt tasks
System AI prompt tasks include predefined prompts, inputs, and outputs. You cannot edit or remove them. Set inputs using issue context or specific values.
To change a system task, duplicate it from the AI Prompts page. Then edit the copy.
From the Task Library pane, select AI Prompts.
On the System tab, find the relevant built-in AI prompt task.
Use the search box to find a prompt with free text.
Drag the selected AI prompt task to the playbook editor.
The Task Details pane opens. Task Type is automatically set to AI Task.
Configure the AI prompt task parameters.
AI prompt task parameter tabs
Inputs
System AI prompt task input definitions, including name, description, and type, are fixed and non-editable.
Includes:
Prompt: The prompt passed to the LLM with the inputs. System prompts are not editable. Inputs use
${}placeholders that are filled with values. Expand the prompt for improved readability.Extracted Inputs: Set input values using a context path or a specific value. Mandatory inputs have an asterisk.
Outputs
AI prompt task outputs in system AI prompts can not be edited. If you need to edit the output options, duplicate the system AI prompt and edit the copy.
Advanced
Includes:
Register as case timeline record: If enabled, the results of the task execution appear as a record in the case timeline. If enabled, you must enter a Record name. You have the option of adding an Effective time, Description, Tags, and marking the record as evidence and adding an evidence comment. NOTE: Only enter an Effective time if you want the same exact time recorded every time the playbook task executes.
Extend context: Appends extracted action results to the context. For example,
"newContextKey1=path1::newContextKey2=path2"returns[path1:'aaa',path2: 'bbb', newContexKey1: 'aaa',newContextKey2:'bbb'].Ignore outputs: When
true, outputs are not stored in context, except extended outputs.Execution timeout (seconds): Sets the command execution timeout.
Indicator Extraction mode: Choose when to extract indicators:
Use system default: The default setting.
None: Do not extract indicators.
Inline: Extract before other playbook tasks.
Out of band: Extract while other tasks run.
Mark results as note
Run without a worker
Skip this branch if this script/playbook is unavailable
Quiet Mode: Tasks do not display inputs or outputs, or extract indicators. Errors and warnings remain documented. Turn quiet mode on or off at the task or playbook level.
Details
Includes:
Tag the result with: Add a tag to the task result. Use the tag to filter War Room entries.
Task description (Markdown supported): Describe the task. You can include context data objects. For example, use a recipient email address in a communication task. The object value reflects the context whenever the task runs.
On Error
Includes:
Number of retries: Number of retries after an error. Default:
0.Retry interval (seconds): Wait time between retries. Default:
30seconds. The maximum is800seconds (13.3 minutes). Values above800are limited to800.
Click OK.
Connect the system AI prompt task by dragging and dropping a wire.
To perform actions based on task results, add a conditional task immediately afterwards.
Add custom AI prompt tasks
Create or edit a custom AI prompt task. You can also edit a duplicated system AI prompt.
From the Task Library pane, select AI Prompts.
Choose one of the following options:
On the System tab, select Local AI Prompt to create a task.
On the Custom tab, find an existing custom task. Select Local AI Prompt to create a task.
To use an existing custom task, drag it to the playbook editor.
Configure the AI prompt task in the Task Details pane.
Set the AI prompt task name.
The name must start with a letter. It cannot contain spaces or special characters.
Set the AI prompt task parameters.
Custom AI prompt task parameter tabs
Inputs
Expand this section to show:
Prompt: Define a natural language prompt passed to the LLM with inputs. Mark input placeholders with square brackets, such as
[input].Extracted Inputs: Lists inputs defined in the prompt, in the same order. Set each input with a context path or specific value. You can set an input as a variable using
${<input name>}. Mandatory inputs have an asterisk.
The Prompt Helper also provides prompt tips.
Outputs
Includes:
Context path: The issue field the task results are saved to. For example, issue.AIseverity. This enables tasks that follow to locate the correct context and use that context as input.
Description (Optional): Description of the output.
Type (Optional): Unknown, String, Number, Date, Boolean.
Use Structured output (Optional)
You can configure the AI prompt task output to enforce a specific JSON structure by providing a custom JSON schema. This ensures the model's response matches your required format, allowing subsequent playbook tasks to successfully use the output.
When you select Use structured output in the Outputs tab you are provided with a JSON template that you can edit or replace entirely.
Schema rules
Available top-level keys:
“type”
“properties”
“required”
“additionalProperties”
The top-level “type” must be “object.”
A nested “type” must be one of the following
array
boolean
integer
null
number
object
string
If your JSON includes an invalid type, an error message appears and provides a list of the correct types.
Advanced
Includes:
Register as case timeline record: If enabled, the results of the task execution appear as a record in the case timeline. If enabled, you must enter a Record name. You have the option of adding an Effective time, Description, Tags, and marking the record as evidence and adding an evidence comment. NOTE: Only enter an Effective time if you want the same exact time recorded every time the playbook task executes.
Extend Issue context: Appends extracted action results to the context. For example,
"newContextKey1=path1::newContextKey2=path2"returns[path1:'aaa',path2: 'bbb', newContexKey1: 'aaa',newContextKey2:'bbb'].Ignore outputs: When
true, outputs are not stored in context, except extended outputs.Execution timeout (seconds): Sets the command execution timeout. Default:
10seconds.Indicator Extraction mode: Choose when to extract indicators:
Use system default: The default setting.
None: Do not extract indicators.
Inline: Extract before other playbook tasks.
Out of band: Extract while other tasks run.
Mark results as note
Run without a worker
Skip this branch if this script/playbook is unavailable
Quiet Mode: Tasks do not display inputs or outputs, or extract indicators. Errors and warnings remain documented. Turn quiet mode on or off at the task or playbook level.
Details
Includes:
Tag the result with: Add a tag to the task result. Use the tag to filter War Room entries.
Task description (Markdown supported): Describe the task. You can include context data objects. For example, use a recipient email address in a communication task. The object value reflects the context whenever the task runs.
Timers
Includes:
Timer.start: Trigger sending a message or survey to recipients. Change this trigger or add a trigger for
Timer.stoporTimer.pause. Select the trigger timer field from the drop-down list.Add Trigger: Add other trigger timer fields from the drop-down list.
On Error
Includes:
Number of retries: Number of retries after an error. Default:
0.Retry interval (seconds): Wait time between retries. Default:
30seconds. The maximum is800seconds (13.3 minutes). Values above800are limited to800.
Prompt Helper tips
Click Save.
The AI prompt task appears in the playbook editor.
Connect the task by dragging and dropping a wire.
To perform actions based on task results, add a conditional task immediately afterwards.
Click Save Playbook.
AI prompt task error handling
Configure error handling, including a return value when an AI prompt task fails. Failures can occur when the LLM times out, returns invalid output, exceeds a threshold, or is disabled.
The War Room logs the failure reason.
Last updated
Was this helpful?
