> For the complete documentation index, see [llms.txt](https://docs.usepylon.com/pylon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usepylon.com/pylon-docs/agents/support-agent/build.md).

# Build

Build your of AI Agent to help augment your team.

Set up a Support Agent to answer customer questions, take action with Skills, and hand off to your team when it needs a person. Building an agent takes a few minutes: you name it, give it knowledge and guidance, decide when it escalates, preview its replies, and deploy it.

After your agent is live, use Quality assurance to check its replies and Improve to make it better over time.

### Create a Support Agent

Go to **Settings > AI controls > Agents** and click **Create**. Pylon walks you through the steps below. You can save your agent as a draft at any time, so you can leave and pick up where you left off at any time.

#### Agent Settings

Name your agent and select an icon.

#### Resources

Resources are forms of knowledge including your Pylon knowledge base, external web pages, or files.

During the setup flow, you have an option to set up an internal agent-only KB to supercharge your support agent. This KB can be maintained by the agent and is a rich resource for the agent to use to answer tickets.

<figure><img src="https://982123570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hXBoCTTNw5flARlUVJf%2Fuploads%2FC2Qwz06yAoKN3J3DTrSm%2Fimage.png?alt=media&amp;token=7d813529-7b84-4ed2-8dea-ab7c48d7417f" alt=""><figcaption></figcaption></figure>

You can connect more resources by following the guidelines here:

{% content-ref url="/pages/55LMxjNj9P2tA9DYAwaa" %}
[Resources](/pylon-docs/platform/training-data.md)
{% endcontent-ref %}

#### Guidance

Guidance is how you tell your agent to behave, in plain language, the same way you'd brief a new teammate. Use it to set:

* **Brand voice**: how the agent should sound, such as friendly and concise, or formal.
* **Policies**: what the agent can and can't offer, such as refunds, discounts, or deadlines.
* **Terminology**: your product's names and terms, and words to avoid.
* **Preferred sources**: which resources to trust first when sources disagree.

When you create an agent, Pylon drafts guidance for you from your resources. Review the draft and edit it to fit your team.

**Organization guidance** holds the rules every agent follows in customer-facing replies, such as your company's tone or legal requirements. Each agent follows its own guidance alongside your organization guidance. Put shared rules in organization guidance so you only write them once.

{% hint style="success" %}
**Tips for writing guidance**

* Be specific. "Offer a refund only within 30 days of purchase" works better than "Be careful with refunds."
* Say what to do, not just what to avoid. Give the agent the action to take instead.
* Keep each rule short and focused on one thing.
* After you change guidance, test the agent to confirm the change worked.
  {% endhint %}

Two things in it are my own wording rather than in-app text: the "30 days" refund example and the tips box. Change them to match your team's voice.

#### Define Escalation Logic

Escalation is how your agent hands an issue to your team. Setting it up has two parts: **when** the agent escalates, and **what happens** when it does.

**When to escalate**

Under **When to escalate**, describe in plain language the situations where the agent should bring in a person. The agent reads these criteria on every issue and escalates when one applies. For example:

* The customer asks to talk to a person.
* The customer is upset or threatens to cancel.
* The request involves billing, refunds, or account changes.
* The customer reports a bug or an outage.
* The agent can't find the answer in its resources.

Pylon has already provided defaults that you can use to get started. We use these in our own agent, so we're sharing them with you.

**What happens when the agent escalates**

Under **What happens when the agent escalates**, set up the actions that run automatically every time the agent escalates. They work like Triggers. Each escalation flow can:

* Change the issue's status
* Assign a team
* Assign a person
* Send a final message to the customer, so they know a person is taking over

New escalation flows set the person to **No assignee** before they assign a team. This takes the issue off the agent so the team's assignment rules can choose a person, even when the team has **Override existing assignee** turned off. Keep this step ahead of the team assignment. If someone on your team has already taken the issue, it stays with them.

To send an issue to a team and let that team's assignment rules, such as round robin, choose the person, assign the team and remove the person assignment that comes after it. Setting the person to **No assignee** leaves the issue unassigned.

Use **branches** to handle different kinds of issues differently. For example, send billing issues to your Billing team and everything else to Tier 2. Branches are checked from top to bottom, and the first one that matches runs all the way through. Put your most specific branches at the top and a catch-all branch at the bottom.

Every branch that sends a final message must also assign a team or person, so no customer is left waiting without an owner.

{% hint style="info" %}
**Let Pylon suggest your escalation actions.** After you save your criteria, Pylon suggests escalation flows to match them. Click **Accept** to add a suggestion to your draft or **Dismiss** to skip it, then click **Save Actions**. If you're creating a new agent, click **Next** instead to save.
{% endhint %}

#### Preview

See a few examples of how your new agent will respond to tickets.

#### Deploy

{% content-ref url="/pages/ooJYoWmLGtoGWUhev9Dd" %}
[Deploy](/pylon-docs/agents/support-agent/deploy.md)
{% endcontent-ref %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.usepylon.com/pylon-docs/agents/support-agent/build.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
