A .xagt file is a structured text file that packages expert knowledge so an AI can follow it: conversation flows, decision logic, expert rules and output templates ([Terms of Service](https://xgentra.com/legal/terms), section 2). It has up to nine sections, from Basic Info to Answer Format. You don't write the structure by hand, but knowing the parts helps you review and fix your agent.

> **Applies to all three ways:** [Builder.xagt (free, build it yourself)](/hc/xgentra/articles/free-build-guide-en), [Seller Center AI build](/hc/xgentra/articles/create-an-xagt-en) and [uploading your own file](/hc/xgentra/articles/download-test-and-upload-en). Not sure which is yours? [Compare the three ways](/hc/xgentra/articles/ways-to-make-an-agent-en).

For a plain-words tour aimed at buyers, see [What's inside an agent](/hc/xgentra/articles/inside-an-xagt-en).

## What are the nine core sections?

The guides use friendly names. The tag in brackets is where each part goes in the actual file.

| Friendly name | What it's for | In the file |
|---|---|---|
| **Basic Rules** | Marks the file as xagt and states the basic rules it follows. | xdf |
| **Basic Info** | The xagt name, description, author and execution style. | xhd |
| **Role and Tone** | What kind of expert the AI should act like and what tone it keeps. | xid |
| **Operating Rules** | Refusal boundaries, required checks and important cautions. | xpl |
| **Expert Knowledge** | FAQs, examples, rules, explanations and book notes used in actual answers. | xkn |
| **Question Sorting** | Which knowledge or workflow to use for each type of question. | xrt |
| **Process** | What to ask first, what to verify, and when the task is complete. | xwf |
| **Calculation Rules** | Optional. Exact calculations such as fees, scores or taxes. | xcd |
| **Answer Format** | Whether the AI answers as a table, checklist, summary or another format. | xout |

The basics are Basic Info, Role and Tone, Operating Rules, Expert Knowledge, Process and Answer Format. Add Question Sorting and Calculation Rules when you need them.

## What's the difference between .xagt and .xagtx?

| Type | What it is | How buyers use it |
|---|---|---|
| **.xagt** | A single agent file. | Upload the file to the AI chat. |
| **.xagtx** | An extended package that carries the agent together with its extra parts, such as a knowledge database. | Upload it as one file, as it is. Don't unpack it. |

Both are supported in the store. Buyers download whichever type your product file is.

## Quality tips

- Rules and answer standards should point back to the material they came from.
- Keep the knowledge focused. A small, well-reviewed agent is better than a large one with gaps.
- Output always depends on the AI service the buyer uses. No .xagt can guarantee accurate answers, so don't promise that in your listing ([Terms of Service](https://xgentra.com/legal/terms), section 8).

**Next step:** read the technical [.xagt Spec](https://xgentra.com/xagt/spec), or go back to [Ways to make an agent](/hc/xgentra/articles/ways-to-make-an-agent-en).
