> 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/configure-cortex-xdr/configure-and-deploy-cortex-xdr/configure-the-cortex-agentic-assistant/agents-hub/build-agents.md).

# Build agents

You can build custom agents to execute plans and assist in investigations. Custom agents have the same or fewer permissions as the user who creates them. For example, you might want to create an agent with all of your permissions to use for certain investigations, but also create a read-only agent that provides you with information, but does not execute actions on real-world systems. You can create custom agents that are private or that are shared for all users.

When you build an agent, it should contain all actions that you require for your workflow. Agents are self-contained and cannot communicate with other agents or access actions that are not assigned to the agent.

{% hint style="info" %}
**NOTE**

To build agents in the Agentic Assistant Hub, you must have view/edit permissions. For more information, see [Agentic Assistant role-based access control](/cortex-xdr-5.x/configure-cortex-xdr/configure-and-deploy-cortex-xdr/configure-the-cortex-agentic-assistant/agentic-assistant-role-based-access-control.md).
{% endhint %}

1. Click the **Agentic Assistant Hub** menu item.
2. From the **Agents** tab of the **Agentic Assistant Hub**, click **Create agent**.
3. Complete the following agent detail fields:

   | Field                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Required |
   | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
   | Agent Name            | A short description name for the agent. Each agent must have a different name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Yes      |
   | Color                 | The color for the icon that appears in the agent list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | No       |
   | Description           | A description of the agent's purpose or area.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes      |
   | Specific Instructions | <p>Provide the agent with detailed customized instructions. You can include a wide range of directives, from describing the agent's role and preferred terminology to step-by-step processes and structure of the output.</p><ul><li><p><strong>Role</strong>: What the agent is supposed to be or act as. Defines its identity and primary function.</p><p>Example A: SOC tier 1 analyst. As a tier 1 analyst you are responsible for triaging alerts and concluding if an alert is a true or false positive.</p><p>Example B: Incident response analyst. As an incident response analyst you are responsible for investigating and conducting forensics of relevant artifacts related to an incident. You provide conclusions about the incident and TTP's used by the threat actor.</p></li><li><p><strong>Instructions</strong>: The specific rules and behavioral guidelines that tell the agent how to operate and respond.</p><p>Example: Follow the NIST framework, provide clear and concise recommendations, use critical thinking when conducting analysis.</p></li><li><p><strong>Structure</strong>: How the agent should format and organize its responses.</p><p>Examples of possible formats: JSON, Markdown, Array, enum.</p></li></ul> | No       |
   | Agent access          | Choose whether to make the agent a **Public Agent**. Public agents can be accessed by all users with **View/Edit** permissions to **Interact with Agents**. By default, custom agents are only available for the users who created them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | No       |
   | Enrich Knowledge      | Connect the agent to specific knowledge bases, document repositories, or Cortex (system) knowledge to provide context-aware responses based on your organization's internal data and system intelligence.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | No       |
   | Conversation starters | Include up to four prompts that appear under the prompt bar when the user interacts with the agent. Conversation starters help users understand what the agent can do and how to initiate a request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | No       |
4. Click **Next** to proceed to the **Access Control** page.
5. Define which roles and actions the agent can access. To save an agent, there must be at least one role or action selected.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>NOTE</strong></p><p>If you clear the checkbox for a role, all actions associated with that role are also cleared. The exception is if another role is also selected, which is associated with the same actions.</p><p>If you clear the checkbox for an action, all roles associated with that action are cleared. For example, if you select the Investigator role, and Send Mail and Tavily Extract are both actions associated with that role, clearing the check box for Investigator also clears the check box for Send Mail and Tavily Extract. If you then reselect the Send Mail action, the Investigator role is not automatically selected.</p><p>Not all actions are associated with a role.</p><p>For an agent to be able to run XQL queries, you must add the Cortex - Run XQL Query action. This action is included by default for all system agents.</p></div>
6. If needed, register one or more new actions by clicking New Action and following the steps in Manage actions.
7. **Save Agent.**


---

# 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/configure-cortex-xdr/configure-and-deploy-cortex-xdr/configure-the-cortex-agentic-assistant/agents-hub/build-agents.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.
