> 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-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook.md).

# Build your playbook

Depending on your use case, you can use or customize a system playbook or develop a new playbook from scratch.

Developing a new playbook from scratch enables a tailored solution for your use case, whereas customizing a system playbook can save time, reduce complexity, and be a more efficient way to meet your organization's specific security and issue response needs.

{% hint style="info" %}

### Important

The ability to create, edit, or share custom playbooks is governed by access management. If certain options are unavailable, contact your administrator. For more information, see [Manage access to playbooks and scripts](/cortex-xsiam/onboard-cortex-xsiam/post-deployment/manage-user-roles-and-access-management.md).
{% endhint %}

Follow these steps to build a playbook.

| Task                                                      | Description                                                                                                                                                                                                                               | See More                                                                                                                                                                                      |
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Task 1. Choose from existing playbooks or create your own | <p>Search for an out-of-the-box playbook to use, customize it, or create one based on your use case.<br>Use the <a href="/pages/fXaU9AdZokW6AtLm5GTD">Automation Engineer agent</a> to create, modify, and query playbooks (preview).</p> | See [Choose from existing playbooks or create your own](/cortex-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook/choose-from-existing-playbooks-or-create-your-own.md). |
| Task 2. Configure playbook settings                       | Define playbook settings, such as playbook triggers, inputs and outputs, and general settings.                                                                                                                                            | See [Configure playbook settings](/cortex-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook/configure-playbook-settings.md).                                             |
| Task 3. Add objects from the Task Library                 | The **Task Library** contains AI prompts, scripts, sub-playbooks, and tasks that enable you to communicate with end users, set conditions, and store relevant data.                                                                       | See [Add objects from the Task Library](/cortex-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook/add-objects-from-the-task-library.md).                                 |
| Task 4. Customize your playbook                           | Add scripts and sub-playbook loops, filtering and transforming data, extracting indicators, extending context, creating issue fields, polling, and more.                                                                                  | See [Customize your playbook](/cortex-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook/customize-your-playbook.md).                                                     |
| Task 5. Test your playbook                                | Set breakpoints, conditional breakpoints, skip tasks, and input and output overrides in the playbook debugger.                                                                                                                            | See [Test your playbook](/cortex-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook/test-your-playbook.md).                                                               |
| Task 6. Manage playbook content                           | Save versions of your playbook in Cortex XSIAM, or manage your playbook content development and testing using a remote repository.                                                                                                        | See [Manage playbook content](/cortex-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook/manage-playbook-content.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-xsiam/configure-cortex-xsiam/automations/playbooks/build-your-playbook.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.
