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

# Telegram Channel

> Chat with Nagare and approve tools via a Telegram bot using the built-in plugin.

The Telegram plugin (`nagare.plugin.builtins.telegram`) lets you chat with Nagare from the Telegram app, receive cron job results, and approve tools when you are away from your computer.

## Setup

**1. Create a Telegram bot**

Chat with [@BotFather](https://t.me/BotFather), use the `/newbot` command, and save the **bot token**.

**2. Set the environment variable for the gateway**

The plugin reads the token from the `NAGARE_TELEGRAM_TOKEN` variable. The plugin inherits the gateway's environment, so set this variable before starting the gateway:

> [tab] Linux / macOS
>
> ```bash theme={null}
> export NAGARE_TELEGRAM_TOKEN="123456:ABC-your-bot-token"
> nagare gateway start
> ```

> [tab] Windows (PowerShell)
>
> ```powershell theme={null}
> $env:NAGARE_TELEGRAM_TOKEN = "123456:ABC-your-bot-token"
> nagare gateway start
> ```

**3. Install the plugin**

The plugin package is pre-installed at:

```text theme={null}
~/.nagare/assets/plugins/builtins/nagare.plugin.builtins.telegram.nagare_plugin
```

Go to **Settings → Plugins → Install Plugin**:

* On the web UI: upload the `.nagare_plugin` file above.
* On the desktop app: enter the absolute path to the file.

Then **activate** the plugin. See [Plugin Overview](https://docs.nagare.smtdfc.net/en/plugins/overview.md#managing-plugins).

**4. Start chatting**

Open the bot on Telegram and send `/start`.

## Commands

| Command | Description |
| - | - |
| `/start` | Start using the bot. |
| `/help` | View the list of commands. |
| `/ping` | Check if the bot responds. |
| `/chat_id` | View the current Telegram chat ID. |
| `/reset` | Start a new chat session with Nagare. |
| `/model_providers` | View the list of configured model providers. |
| `/approve <request-id>` | Approve a tool approval request. |
| `/reject <request-id>` | Reject a tool approval request. |

Any other text message is forwarded to Nagare as a normal chat message.

## Tool approval

When Nagare needs to run a risky tool, the bot sends a message with two buttons **Approve** and **Reject**. You can also use the `/approve` or `/reject` command with the request ID.

## Notes

> [!WARNING]
>
> The plugin does not restrict which Telegram users are allowed to chat. Anyone who finds the bot can send requests to Nagare on your machine. Keep the bot name secret and always read approval requests carefully before accepting.

* The bot uses long polling, so no port opening or webhook configuration is needed.
* If the conversation is inactive for **2 hours**, the channel is released; the next message will reconnect automatically.
* Plugin logs are at `~/.nagare/logs/plugins/nagare.plugin.builtins.telegram.log`.


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