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

# lua features

> Built-in agent features such as rag, webSearch, inquiry and outboundChannels: list, enable, disable, view and configure them

`lua features` turns an agent's built-in [features](/concepts/knowledge-and-features) on or off and sets the one structured setting a feature has. A change applies to the agent immediately, in sandbox and production alike.

*Verified against lua-cli 3.33.0.*

## Synopsis

```bash theme={null}
lua features [action] [--feature-name <name>] [--recipient-scope <current_user|anyone>]
lua features <list|enable|disable|view|configure>
```

## Description

Features are platform capabilities the model can use without any code of yours: `rag` (Knowledge Search over [resources](/reference/cli/resources)), `webSearch`, `inquiry` (conversational forms) and `outboundChannels` (sending on connected channels). `lua features list` prints the agent's full catalog, which includes more names than these four; every name it prints can be passed to `--feature-name`.

Enabling an already enabled feature, or disabling a disabled one, is a no-op and says so. `configure` changes only a feature's config and leaves its active state as it is; the one config today is the `recipientScope` of `outboundChannels`: `current_user` lets the agent message only the end user it is talking to, `anyone` lets it message recipients it chooses.

Without an action the command opens a menu where a feature's prompt context can be edited in `$EDITOR`; that editing is interactive only. Every action in the Actions table runs without a prompt. Under `--ci` the menu exits 1 instead of waiting; pass an action and `--feature-name`.

## Arguments

| Argument | Values                                           | Description                                                                                                                                                                       |
| -------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action` | `list`, `enable`, `disable`, `view`, `configure` | Aliases: `ls`, `l` → `list`; `on`, `activate` → `enable`; `off`, `deactivate` → `disable`; `show`, `info`, `status` → `view`; `config`, `set` → `configure`. Omit it for the menu |

### Actions

| Action      | Description                                                                     | Prints                                                                                       |
| ----------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `list`      | Every feature with its title, name and status                                   | `<n>. ✅ <title>` or `❌ <title>`, then `Name:` and `Status: Active` or `Inactive`             |
| `enable`    | Activate a feature                                                              | `✅ Feature "<title>" enabled successfully`, or `ℹ️  Feature "<title>" is already enabled.`   |
| `disable`   | Deactivate a feature                                                            | `✅ Feature "<title>" disabled successfully`, or `ℹ️  Feature "<title>" is already disabled.` |
| `view`      | One feature: name, status, the prompt context it injects, and its config values | `Name:`, `Status:`, `Context/Instructions:`, `Config:` with one `key: value` line each       |
| `configure` | Set `recipientScope` on `outboundChannels`                                      | `✅ <title>: recipientScope = <scope>`                                                        |

## Options

| Option                      | Description                                                                                                                     | Default |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `--feature-name <name>`     | The feature's `name` (`rag`) or its title (`Knowledge Search (RAG)`), case-insensitive. Required for every action except `list` | —       |
| `--recipient-scope <scope>` | `configure`: `current_user` or `anyone`. Required for `configure`                                                               | —       |

A missing `--feature-name` is `✖ usage: --feature-name is required for action "<action>"` (exit 2) with the available names as the hint; an unknown one is `✖ not_found: Feature "<name>" not found` (exit 3). `configure` without a valid scope prints `❌ --recipient-scope is required for configure (current_user | anyone)` and exits 1.

## Examples

List the catalog and the current state of each feature.

```bash theme={null}
lua features list --ci
```

```text Output theme={null}
============================================================
🎯 Agent Features
============================================================

1. ✅ Knowledge Search (RAG)
   Name: rag
   Status: Active

2. ✅ WebSearch (Domain-Specific Information Retrieval)
   Name: webSearch
   Status: Active

3. ✅ Create Inquery forms
   Name: inquiry
   Status: Active

4. ✅ Location (Geocoding & Reverse Geocoding)
   Name: location
   Status: Active

5. ❌ Outbound Channels
   Name: outboundChannels
   Status: Inactive

…
============================================================
```

Turn web search off for an agent that should answer from its own knowledge only.

```bash theme={null}
lua features disable --feature-name webSearch --ci
```

Let the agent send proactive messages to the current end user only.

```bash theme={null}
lua features enable --feature-name outboundChannels --ci
lua features configure --feature-name outboundChannels --recipient-scope current_user --ci
```

Read a feature's injected context and config.

```bash theme={null}
lua features view --feature-name outboundChannels --ci
```

```text Output theme={null}
============================================================
🎯 Outbound Channels
============================================================
Name: outboundChannels
Status: ❌ Inactive

Context/Instructions:
────────────────────────────────────────────────────────────
This agent can send outbound messages on its connected channels using the outbound tools — call `listOutboundChannels` to see what's connected. …
============================================================
```

## Exit codes

| Code | Meaning                                                                                              |
| ---- | ---------------------------------------------------------------------------------------------------- |
| `0`  | Success, including a no-op enable or disable                                                         |
| `1`  | The feature list could not be loaded, or an enable, disable or configure failed (`Operation failed`) |
| `2`  | Usage: unknown action, missing `--feature-name`                                                      |
| `3`  | Feature not found                                                                                    |
| `9`  | Not signed in (401)                                                                                  |
| `10` | Forbidden (403 or another 4xx)                                                                       |
| `11` | Unavailable: 5xx, connection refused, timeout                                                        |
| `12` | The model provider refused the request (424)                                                         |

## See also

* [Knowledge and features](/concepts/knowledge-and-features) — what each feature does
* [Add knowledge](/build/add-knowledge) — resources and `rag` together
* [Send proactive messages](/build/send-proactive-messages) — `outboundChannels` in practice
* [`lua resources`](/reference/cli/resources) — the documents `rag` searches
