> ## Documentation Index
> Fetch the complete documentation index at: https://rasa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Project structure

> Every file and folder a Mantle agent recognises, and which are required.

A Mantle project is two config files and a `skills/` folder. Everything else is
optional and added when a skill needs it.

## The minimum

This is a complete, trainable agent:

```
my-agent/
├── agent.yml              # Identity, persona, rules, prompt tuning
├── integrations.yml       # LLM provider and channels
└── skills/
    └── card_replace/      # The folder name is the skill id
        └── skill.md       # Instructions, and any control declarations
```

## Everything a project can hold

Each optional file is added only when a skill needs it:

```
my-agent/
├── agent.yml              # Required. Identity, persona, rules, prompt tuning
├── integrations.yml       # Required. LLM provider and channels
├── memory.yml             # Optional. Project-wide memory, the project. namespace
├── responses.yml          # Optional. Project-wide responses, overrides built-in wording
├── references/            # Optional. Agent-wide knowledge, every **/*.md is indexed
├── tools/                 # Optional. Shared tools, declared with import_tools
└── skills/
    └── card_replace/
        ├── skill.md       # Required. The only required file in a skill
        ├── memory.yml     # Optional. This skill's memory schema
        ├── responses.yml  # Optional. Verbatim wording
        ├── tools.py       # Optional. Auto-discovered, no declaration needed
        ├── tools/         # Optional. Or a folder of them, also auto-discovered
        └── references/    # Optional. Indexed into the same project-wide index
```

## What makes it a Mantle project

The engine is chosen by layout rather than by a config key. A project is Mantle
when it has an `integrations.yml` **and** at least one `skills/*/skill.md`.

That glob is one level deep, so a skill folder sits directly under `skills/`.

## Agent root

| Path | Required | Purpose |
| - | - | - |
| `agent.yml` | **Yes** | [Identity, persona, rules, prompts, session settings](https://rasa.com/docs/mantle/reference/agent-yml.md) |
| `integrations.yml` | **Yes** | [LLM provider, channels, optional MCP servers, model groups](https://rasa.com/docs/mantle/reference/integrations-yml.md) |
| `memory.yml` | No | [Project-wide memory](https://rasa.com/docs/mantle/reference/memory-yml.md#project-memory-memoryyml-at-the-agent-root). A flat map, resolving to `session.project.<entry>` |
| `responses.yml` | No | [Project-wide responses](https://rasa.com/docs/mantle/reference/responses-yml.md). Declaring a built-in name here replaces it |
| `references/` | No | Markdown indexed at train time, reachable through `search_knowledge` |
| `tools/` | No | Shared tools. A skill uses one by naming it in `import_tools` |

## A skill folder

| Path | Required | Purpose |
| - | - | - |
| `skill.md` | **Yes** | [Frontmatter and prose body](https://rasa.com/docs/mantle/reference/skill-md.md) |
| `memory.yml` | No | [This skill's schema](https://rasa.com/docs/mantle/reference/memory-yml.md), under `session.<skill_id>.<entry>` |
| `responses.yml` | No | [Verbatim wording](https://rasa.com/docs/mantle/reference/responses-yml.md) |
| `tools.py` or `tools/*.py` | No | [Tools](https://rasa.com/docs/mantle/reference/tools.md), auto-discovered |
| `references/` | No | Knowledge, indexed into the project-wide index |

The **folder name is the skill id**. A skill in `skills/card_replace/` is
`@skill.card_replace` in prose and `session.card_replace.<entry>` in memory,
whatever its frontmatter `name:` says.

## Declared or discovered

The difference decides whether a tool is usable without any config:

* **A skill's own tools** are auto-discovered from `tools.py` and `tools/*.py` in
  that folder. Nothing to declare. Within one skill, a `tools/*.py` definition
  shadows a same-named one in `tools.py`.
* **Shared tools** in the agent-root `tools/` folder must be named in the skill's
  `import_tools`. A shared tool that is not declared is not attached to the skill.
* **MCP tools** use `mcp/<server-id>:<tool-name>` in `import_tools`. Only listed
  tools are attached; see [Import MCP tools](https://rasa.com/docs/mantle/concepts/tools.md#mcp-tools).
* On a name collision between skill-local and shared tools, the skill-local tool
  wins. An MCP bare name that collides with either fails `rasa train`.

## What ships in the trained model

`rasa train` copies `agent.yml`, `integrations.yml`, `memory.yml`,
`responses.yml`, and the `skills/`, `tools/`, and `references/` directories into
the model archive.

Two consequences worth knowing:

* The reference index is built at train time, so adding or editing a file under
  any `references/` folder needs a retrain before the agent can answer from it.
* `llm:`, `channels:`, and `mcp_servers:` are read from your project directory at
  runtime, so a provider, channel, or MCP connection change only needs a restart.

## Files the scaffold adds

`rasa init --engine mantle` also writes `AGENTS.md`, context for your coding
agent, and `.env`, holding your keys. Neither is read by the engine: `.env`
supplies the environment variables that `api_key_env` and `${VAR}` resolve
against, and `AGENTS.md` is for your IDE.

## See also

* [Getting Started](https://rasa.com/docs/mantle/getting-started.md): scaffold a project and build the first skill
* [skill.md](https://rasa.com/docs/mantle/reference/skill-md.md): the contract for the one required file


## Related topics

- [Getting Started](https://rasa.com/docs/mantle/getting-started.md)
- [Model Storage](https://rasa.com/docs/reference/integrations/model-storage.md)
- [Custom Actions](https://rasa.com/docs/reference/primitives/custom-actions.md)
- [Building a Conversational AI Team](https://rasa.com/docs/learn/best-practices/conversational-ai-teams.md)
- [Overview](https://rasa.com/docs/reference/config/agents/overview-agents.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.