> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/investigate-and-respond-to-cases/automation/playbooks.md).

# Playbooks

Playbooks are a series of tasks that run in a predefined flow to save time and improve the efficiency and results of the investigation and response process. They enable you to automate many security processes, including handling investigations and managing tickets. For example, a playbook task can parse the information in an issue, whether it is an email or a PDF attachment. Playbooks also standardize workflows, ensuring consistent and efficient incident response and management.

{% hint style="warning" %}

### Prerequisite

To work with playbooks, an administrator must configure their user role with specific RBAC permissions.

* Permissions must be enabled in the following order:

1. **Scripts**: This component (under **Investigation & Response** → **Automations**) must be set to **Enabled** first. It is the foundational permission for all automation; if **Scripts** are not enabled, you cannot configure **Playbooks** or **Cases and Issues**. Role-level permissions determine your ability to create new scripts or edit those marked as **Public**.
2. **Playbooks**: This component (under **Investigation & Response** → **Automations**) must be set to **Enabled**. Role-level permissions determine your ability to create new playbooks or edit those marked as **Public**. Specific access to individual custom playbooks and scripts is managed at the object level. For detailed information on the access model, see [Access to playbooks](/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/investigate-and-respond-to-cases/automation/playbooks/access-to-playbooks.md).
3. **Cases and Issues**: Once **Scripts** and **Playbooks** are enabled, you can set **Cases and Issues** (under **Cases & Issues**) to **View** or **View/Edit**. This is required to view the results of playbooks executed within a case.

* **Credentials**: While not required to open the Playbook Editor, a minimum of **View** permissions for **Credentials** is required to select or reference stored secrets within playbook tasks. If your role has the **Credentials** permission set to **None**, you will be unable to select credentials from dropdown menus. Furthermore, any task that attempts to retrieve a credential to authenticate an integration command will fail during execution because the system cannot fetch the secret under your role's restricted context.
* **Restricting playbook access**: To completely restrict playbook access, first set the **Cases and Issues** RBAC permission to **None** and then set the **Playbooks** permission to **Disabled**.
  {% endhint %}

### Automation Engineer agent for playbook development (preview)

Use the **Automation Engineer** agent to accelerate your playbook development by enabling you to build and refine Cortex playbooks using natural language. Integrated directly into the Playbook Editor, this specialized agent enables you to generate new workflows from scratch, iterate on existing playbook logic, and ask clarifying questions about automation tasks. For instance, you can prompt the agent to "Add a step to block the domain in Okta" or ask it to explain how a specific conditional branch operates.

For more details about using the Automation Engineer agent, see [Accelerate playbook development using the Automation Engineer agent (preview)](/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/investigate-and-respond-to-cases/automation/playbooks/accelerate-playbook-development-using-the-automation-engineer-agent-preview.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/detect-investigate-and-respond-to-threats/investigate-and-respond-to-cases/automation/playbooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
