## 1. Project Overview & Quickstart (RasaHQ/rasa)

## File: README.md

<h1 align="center">Rasa Open Source</h1>







<hr />

## 🚀 The Future of Rasa: Hello Rasa

**Building reliable AI agents just got easier.**

[**Hello Rasa**](https://hello.rasa.ai/?utm_source=github&utm_medium=website&utm_campaign=) is our new interactive playground for prototyping AI agents. It combines LLM fluency with the reliability of business logic using our **CALM** (Conversational AI with Language Models) engine.

### Why switch to Hello Rasa?

* **No setup required:** Open the playground, pick a template (Banking, Telecom, Support), and start building in your browser.
* **No NLU training:** We have moved beyond intents. The LLM handles dialogue understanding while you define the business flows.
* **Built-in copilot:** A specialized AI assistant helps you generate code, debug flows, and expand your agent instantly.
* **Production ready:** Hello Rasa is not just a toy. Export your agent to the Rasa Platform when you are ready to scale.

### Core concepts

* **CALM:** Combines LLM flexibility with strict business logic. The LLM understands the user; the code enforces the rules.
* **Flows:** Describe logical steps (e.g., collect money, transfer funds) rather than rigid dialogue trees.
* **Inspector:** See real-time decision-making. No black boxes.

👉 **[Start building for free at Hello Rasa](https://hello.rasa.ai/?utm_source=github&utm_medium=website&utm_campaign=)**

---

## 🧠 Join the Agent Engineering Community

We are building a home for people shipping real-world AI agents. 

Agent Engineering is evolving faster than any single framework. This is a vendor-neutral space to discuss architectures, memory, orchestration, and safety with builders across the industry.

### What you get:
* **Network:** Meet engineers building production agents
* **Learn:** Discuss practical patterns, not just theory
* **Access:** Direct influence on the Hello Rasa roadmap and early access to features

| Channel | Purpose |
| :--- | :--- |
| **#agent-design** | Architectures, reasoning, memory, testing |
| **#showcase** | Show your builds, demos, and repos |
| **#ask-anything** | Debugging and workflow questions |

👉 **[Join the Community](https://info.rasa.com/community?utm_source=github&utm_medium=website&utm_campaign=)**

---




# Rasa Open Source (Legacy)

> **Note:** The documentation and installation instructions below apply to the classic Rasa Open Source framework. For the latest CALM-based experience, see the [Hello Rasa](#-the-future-of-rasa-hello-rasa) section above.

Rasa is an open source machine learning framework for automating text and voice-based conversations. With Rasa, you can build contextual assistants on:

- Facebook Messenger
- Slack
- Google Hangouts
- Webex Teams
- Microsoft Bot Framework
- Rocket.Chat
- Mattermost
- Telegram
- Twilio
- Your own custom conversational channels

Rasa helps you build contextual assistants that can handle layered conversations with lots of back-and-forth. 

### 📚 Resources
- 🤓 [Read the docs](https://rasa.com/docs/rasa/)
- 😁 [Install Rasa](https://rasa.com/docs/rasa/installation/environment-set-up)
- 🚀 [Learn all about Conversational AI](https://learning.rasa.com/)
- 🏢 [Explore the enterprise platform](https://rasa.com/product/rasa-platform/)

## Development Internals & Contributing

We are happy to receive contributions. Please review our [Contribution Guidelines](CONTRIBUTING.md) before getting started.

### Installation for Development
Rasa uses **Poetry** for packaging and dependency management.

1.  **Install Poetry**: Follow the [official guide](https://python-poetry.org/docs/#installation).
2.  **Build from source**:
    ```bash
    make install
    ```
    *Note for macOS users*: If you run into compiler issues, try `export SYSTEM_VERSION_COMPAT=1` before installation.

### Running Tests
Make sure you have development requirements installed:

```bash
make prepare-tests-ubuntu # Ubuntu/Debian
make prepare-tests-macos  # macOS
make test                 # Run tests
```

### Releases

Rasa follows Semantic Versioning.

  * **Major**: Incompatible API changes
  * **Minor**: Backward-compatible functionality
  * **Patch**: Backward-compatible bug fixes

For full details on our release cadence and maintenance policy, visit our [Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/).

## License

Licensed under the Apache License, Version 2.0. Copyright 2022 Rasa Technologies GmbH. [Copy of the license](https://www.google.com/search?q=LICENSE.txt).

---

## File: changelog/12685.doc.md

Corrected [action server api](https://rasa.com/docs/rasa/pages/action-server-api/) sample in docs.

---

## File: changelog/12721.doc.md

Updated tracing documentation to include tracing in the action server and the REST Channel.

---

## File: changelog/README.md

This directory contains "newsfragments" which are short files that contain a small
**Markdown**-formatted text that will be added to the next `CHANGELOG`.

The `CHANGELOG` will be read by **users**, so this description should be aimed
to Rasa OSS users.

Make sure to use full sentences in the **past or present tense** and use
punctuation, examples:

    Slots will be correctly interpolated if there are lists in custom response templates.

    Previously this resulted in no interpolation.

Each file should be named like `.<TYPE>.md`, where
`` is an issue / PR number, and `<TYPE>` is one of:

* `feature`: new user facing features, like new command-line options and new behavior.
* `improvement`: improvement of existing functionality, usually without requiring user intervention.
* `bugfix`: fixes a reported bug or security vulnerability.
* `doc`: documentation improvement, like rewording an entire section or adding missing docs.
* `removal`: feature deprecation or feature removal.
* `misc`: fixing a small typo or internal change, will not be included in the changelog.

So for example: `123.feature.md`, `456.bugfix.md`.

If your change fixes an issue, use the issue number here. If there is no issue,
then after you submit the PR with your changes and get the PR number, you can add a
changelog using that PR number instead.

If you are not sure what issue type to use, don't hesitate to ask in your PR.

`towncrier` preserves multiple paragraphs and formatting (code blocks, lists,
and so on), but for entries other than `features` it is usually better to stick
to a single paragraph to keep it concise. You can install `towncrier` and then
run `towncrier --draft` if you want to get a preview of how your change will look
in the final release notes.

---

## File: data/README.md

These are some example training data files for a simple bot in the restaurant domain. 
They are in the format of the services rasa NLU can emulate, e.g. when you download an export
of your app from one of these services it should look like one of these files.


[examples/rasa](examples/rasa): examples in the native rasa NLU format

[examples/luis](examples/luis): in LUIS format

[examples/wit](examples/wit): in wit format

[examples/api](examples/api): this is a dir and in Dialogflow format

---

## File: docs/docs/action-server/actions.mdx

---
id: actions
sidebar_label: Actions
title: Actions
---

When a Rasa assistant calls a custom action, it sends a request to the action server. 
Rasa only knows about whatever events and responses come back in the request response;
it's up to the action server to call the correct code based on the action name that Rasa provides.

To better understand what happens when Rasa calls a custom action, consider 
the following example:

You have deployed a weather bot to both Facebook and Slack. The user
can ask for the weather with the intent `ask_weather`. There is a slot `location`
which will be filled if the user has specified a location.
The action `action_tell_weather` will use an API to get the weather forecast ,
using a default location if the user doesn't specify one. 
The action will set the `temperature` to the maximum temperature of the weather forecast.
The message returned will differ according to the channel they are using. 


:::info Compressed body in HTTP requests
Rasa has the capability to compress the HTTP request body for custom actions.
By default, this option is off to keep backward compatibility with older versions of
custom action servers which did not receive the compressed body in the HTTP request for custom actions.
To enable this option, set environment variable COMPRESS_ACTION_SERVER_REQUEST to `True`.

Rasa SDK versions `3.2.2`, `3.3.1`, `3.4.1` and upwards,
support both compressed and non-compressed body in the HTTP request for
running custom action server. There is no additional setup required.
:::

## Custom Action Input

Your action server receives the following payload from the Rasa server: 

```
/* Detailed source-code truncated for AI context efficiency. */
```


### `next_action`

The `next_action` field tells your action server what action to run. 
Your actions don't have to be implemented as classes, but they do have
to be callable by name. 

In the example case, your action server should run the action `action_tell_weather`.

### `sender_id`

The `sender_id` tells you the unique ID of the 
user having the conversation. Its format varies according to the input channel.
What it tells you about the user also depends on the input channel and how
the user is identified by the channel. 

In the example case, the `sender_id` is not used for anything.

### `tracker`

The `tracker` contains information about the conversation, including a history of events
and a record of all slots:

- `sender_id`: The same `sender_id` as is available in the top level of the payload
- `slots`: Each slot in your bot's domain and its value at the current time
- `latest_message`: The attributes of the latest message
- `latest_event_time`: The timestamp at which the last event was added to the tracker
- `followup_action`: The action called was a forced follow up action
- `paused`: Whether the conversation is currently paused
- `events`: A list of all previous [events](./events.mdx)
- `latest_input_channel`: The input channel from which the last user message was received
- `active_form`: The name of the currently active form, if any
- `latest_action_name`: The name of the last action the bot executed

In the example case, your custom action uses the value of the `location` slot (if it is set)
to get the weather forecast. It also checks the `latest_input_channel` property
and formats the message payload so that it will display correctly in Facebook Messenger.

### `domain`

The `domain` is a json representation of your `domain.yaml` file.
It is unlikely that a custom action
will refer to its contents, as they are static and do not indicate the state
of the conversation. 

You can control if an action should receive a domain or not.
Visit [selective-domain](../domain.mdx#select-which-actions-should-receive-domain)

### `version`

This is the version of the Rasa server. A custom action
is also unlikely to refer to this, although you might use it in a 
verification step if your action server
is only compatible with certain Rasa versions.


## Custom Action Output

The Rasa server expects a dictionary of `events` and `responses` as a response
to a custom action call. 

### `events`

[Events](./events.mdx) are how your action server can influence the conversation.
In the example case, your custom action should store the maximum temperature 
in the `temperature` slot, so it needs to return a [`slot` event](./events.mdx#slot). To set the
slot and do nothing else, your response payload would look like this:

```json
    {
        "events": [
            {
                "event": "slot",
                "timestamp": null,
                "name": "temperature",
                "value": "30"
            }
        ],
        "responses": []
    }
```

Note that events will be applied to the tracker in the order you list them; with `slot`
events, the order won't matter, but with other event types it can.

### `responses`

A response can be of any of the response types described in the
[documentation on rich responses](../responses.mdx#rich-responses).
See the response sample of the [API spec](/pages/action-server-api) for the expected formats. 

In the example case, you want to send the user a message with the weather forecast. 
To send a regular text message, the response payload would look like this:

```json
    {
        "events": [
            {
                "event": "slot",
                "timestamp": null,
                "name": "temperature",
                "value": "30"
            }
        ],
        "responses": [
            {
                "text": "This is your weather forecast!"
            }
        ]
    }
```



However, you want to make use of your channels' specific capabilities. Since 
the `latest_input_channel` was Facebook, you add a response with
a custom payload that will be rendered as a media message according to Facebook's API spec.
Your response payload then looks like this:


```json
    {
        "events": [
            {
                "event": "slot",
                "timestamp": null,
                "name": "temperature",
                "value": "30"
            }
        ],
        "responses": [
            {
                "text": "This is your weather forecast!"
            },
            {
                "attachment": {
                    "type": "template",
                    "payload": {
                        "template_type": "media",
                        "elements": [
                            {
                                "media_type": "weather_forcast.gif",
                                "attachment_id": ""
                            }
                        ]
                    }
                }
            }
        ]
    }
```

When this response is sent back to 
the Rasa server, Rasa will apply the `slot` event and two responses to the tracker, 
and return both messages to the user.

## Special Action Types

There are special action types that are automatically triggered under certain circumstances, namely [default actions](../default-actions.mdx)
and  [slot validation actions](../slot-validation-actions.mdx).
These special action types have predefined naming conventions that must be followed to maintain the automatic triggering behavior.

You can customize a default action by implementing a custom action with exactly the same name.
Please see the [docs on default actions](../default-actions.mdx) for the expected behavior of each action.

Slot validation actions are run on every user turn, depending on whether a form is active or not.
A slot validation action that should run when a form is not active must be called `action_validate_slot_mappings`.
A slot validation action that should run when a form is active must be called `validate_<form name>`.
These actions are expected to return `SlotSet` events only and to behave like the Rasa SDK [`ValidationAction` class](./validation-action.mdx#validationaction-class-implementation)
and [`FormValidationAction` class](./validation-action.mdx#formvalidationaction-class-implementation) respectively.

---

## File: docs/docs/action-server/events.mdx

---
id: events
sidebar_label: Events
title: Events
---



Conversations in Rasa are represented as a sequence of events. Custom actions can 
influence the course of a conversation by returning events in the response to the action server request.

Not all events are typically returned by custom actions since 
they are tracked automatically by Rasa (e.g. user messages).
Others events can only be tracked if they are returned by a custom action. 

## Event Types


### `slot`

Sets a slot on the tracker. It can set a slot to a value, 
or reset a slot by setting its value to `null`. 

**Automatic Tracking**:

* When a slot is filled by an entity of the same name. 

A custom action is needed
to set any slot not auto-filled by an entity. 


**JSON**:

```json
{
    "event": "slot",
    "name": "departure_airport", 
    "value": "BER"
}
```


**Parameters**:

* `name`: Name of the slot to set
* `value`: Value to set the slot to. The datatype must match the [type](../domain.mdx#slot-types)
   of the slot

**Rasa Class**: `rasa.core.events.SlotSet`


### `reset_slots`

Resets all slots on the tracker to `null`. 

**Automatic Tracking**: Never

**JSON**:

```json
{
    "event": "reset_slots"
}
```

**Rasa Class**: `rasa.core.events.AllSlotsReset`


### `reminder`

Schedules an intent to be triggered at a certain time in the future. 

**Automatic Tracking**: Never

**JSON**:

```json
{
  "event": "reminder",
  "intent": "my_intent",
  "entities": {"entity1": "value1", "entity2": "value2"},
  "date_time": "2018-09-03T11:41:10.128172",
  "name": "my_reminder",
  "kill_on_user_msg": true,
}
```

**Parameters**:

* `intent`: Intent which the reminder will trigger 
* `entities`: Entities to send with the intent
* `date_time`: Date at which the execution of the action should be triggered. This should either be in UTC or include a timezone.
* `name`: ID of the reminder. If there are multiple reminders with the same id only the last will be run.
* `kill_on_user_msg`: Whether a user message before the trigger time will abort the reminder

**Rasa Class**: `rasa.core.events.ReminderScheduled`


### `cancel_reminder`

Cancels a scheduled reminder or reminders. 
All reminders which match the supplied parameters will be cancelled.

**Automatic Tracking**: Never

**JSON**:

```json
{
  "event": "cancel_reminder",
  "name": "my_reminder",
  "intent": "my_intent",
  "entities": [
        {"entity": "entity1", "value": "value1"},
        {"entity": "entity2", "value": "value2"},
    ],
  "date_time": "2018-09-03T11:41:10.128172",
}
```

**Parameters**:


* `intent`: Intent which the reminder will  trigger 
* `entities`: Entities to send with the intent
* `date_time`: Date at which the execution of the action should be triggered. This should either be in UTC or include a timezone.
* `name`: ID of the reminder.


**Rasa Class**: `rasa.core.events.ReminderCancelled`

### `pause`

Stops the bot from responding to user messages. The conversation will remain paused and no actions will be predicted until  the conversation is explicitly [resumed](#resume).

**Automatic Tracking**: Never

**JSON**:

```json
{
    "event": "pause"
}
```

**Rasa Class**: `rasa.core.events.ConversationPaused`

### `resume`

Resume a previously paused conversation. Once this event is added to the tracker the bot will start predicting actions again. It will not predict actions for user messages received while the conversation was paused.

**Automatic Tracking**: Never

**JSON**:

```json
{
    "event": "resume"
}
```


**Rasa Class**: `rasa.core.events.ConversationResumed`

### `followup`

Force a follow up action, bypassing action prediction. 

**Automatic Tracking**: Never

**JSON**:

```json
{
    "event": "followup",
    "name": "my_action"
}
```

**Parameters**:

* `name`: The name of the follow up action that will be executed.


**Rasa Class**: `rasa.core.events.FollowupAction`

### `rewind`

Reverts all side effects of the last user message and removes the last `user` event from the tracker. 

**Automatic Tracking**: 

**JSON**:

```json
{
    "event": "rewind"
}
```

**Rasa Class**: `rasa.core.events.UserUtteranceReverted`


### `undo`

Undoes all side effects of the last bot action and removes the last bot action from the tracker. 

**Automatic Tracking**: 

**JSON**:

```json
{
    "event": "undo"
}
```

**Rasa Class**: `rasa.core.events.ActionReverted`



### `restart`

Resets the tracker. After a `restart` event, there will be no conversation history and no record of the restart.

**Automatic Tracking**: 

* When the `/restart` default intent is triggered.


**JSON**:

```json
{
    "event": "restart"
}
```


**Rasa Class**: `rasa.core.events.Restarted`


### `session_started`

Starts a new conversation by resetting the tracker and running the default action `ActionSessionStart`. This action will by default carry over existing `SlotSet` events to a new conversation session. You can configure this behaviour in your domain file under `session_config`.

**Automatic Tracking**: 

* Whenever a user starts a conversation with the bot for the first time.
* Whenever a session expires (after `session_expiration_time` specified in the domain), and the user resumes their conversation

Restarting a conversation with [`restart`](#restart) event **does not** automatically cause a `session_started` event. 

**JSON**:

```json
{
    "event": "session_started"
}
```

**Rasa Class**: `rasa.core.events.SessionStarted`


### `user`

The user sent a message to the bot. 

**Automatic Tracking**: 

* When the user sends a message to the bot.

This event is not usually returned by a custom action.

**JSON**:

```json
{
    "event": "user",
    "text": "Hey",
    "parse_data": {
        "intent": {
            "name": "greet",
            "confidence": 0.9
        },
        "entities": []
    },
    "metadata": {},
}
```

**Parameters**:

* `text`: Text of the user message
* `parse_data`: Parsed data of user message. This is ordinarily filled by NLU.
* `metadata`: Arbitrary metadata that comes with the user message

**Rasa Class**: `rasa.core.events.UserUttered`

### `bot`

The bot sent a message to the user.


**Automatic Tracking**: 

* Whenever `responses` are returned by a custom action
* Whenever responses are sent to the user directly without being returned by a custom action (e.g. `utter_` actions)

This event is not usually returned explicitly by a custom action; `responses` would be returned instead.

**JSON**:

```json
{
    "event": "bot",
    "text": "Hey there!",
    "data": {}
}
```

**Parameters**:

* `text`: The text the bot sends to the user
* `data`: Any non-text elements of the bot response. The structure of `data` matches that of `responses` given in the [API spec](/pages/action-server-api).

**Rasa Class**: `rasa.core.events.BotUttered`


### `action`

Logs an action called by the bot. Only the action itself is logged; the events that the action creates are logged separately when they are applied. 

**Automatic Tracking**: 

* Any action (including custom actions and responses) that is called, even if the action does not execute successfully.

This event is not usually returned explicitly by a custom action. 

**JSON**:
```json
{
    "event": "action",
    "name": "my_action"
}
```
**Parameters**:

* `name`: Name of the action that was called

**Rasa Class**: `rasa.core.events.ActionExecuted`

## 2. Official Technical Reference & Guides (RasaHQ/docs)

# Mintlify Starter Kit

Use the starter kit to get your docs deployed and ready to customize.

Click the green **Use this template** button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with

- Guide pages
- Navigation
- Customizations
- API reference pages
- Use of popular components

**[Follow the full quickstart guide](https://starter.mintlify.com/quickstart)**

## AI-assisted writing

Set up your AI coding tool to work with Mintlify:

```bash
npx skills add https://mintlify.com/docs
```

This command installs Mintlify's documentation skill for your configured AI tools like Claude Code, Cursor, Windsurf, and others. The skill includes component reference, writing standards, and workflow guidance.

See the [AI tools guides](/ai-tools) for tool-specific setup.

## Development

Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview your documentation changes locally. To install, use the following command:

```
npm i mint
```

Run the following command at the root of your documentation, where your `docs.json` is located:

```
mint dev
```

View your local preview at `http://localhost:3000`.

## Publishing changes

Install our GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app) to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch.

## Need help?

### Troubleshooting

- If your dev environment isn't running: Run `mint update` to ensure you have the most recent version of the CLI.
- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.

### Resources
- [Mintlify documentation](https://mintlify.com/docs)