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

# Meet your Entity in Telegram

> Connect a bot, map your identity, and use direct runtime controls.

Telegram connects a bot account to the running Entity. Conversations use the same identity and memory as other connected surfaces.

## Connect the bot

Create a bot through [BotFather](https://t.me/BotFather) and store its token in the private root `.env` under `TELEGRAM_TOKEN`. Keep an existing `.env` intact when adding the variable.

Add the platform to the Entity declaration:

```yaml theme={"theme":"github-light-default"}
presence:
  platforms:
    - type: telegram
      token_env: TELEGRAM_TOKEN
```

Start the runtime:

```bash theme={"theme":"github-light-default"}
uv run ngram run rook
```

Open a conversation with the bot and send `/start`. Use `run` or `worker`; `talk` runs only the terminal conversation.

## Establish your identity and access

Send `/whoami` to obtain your Telegram user ID. Use that same canonical person ID when pairing a spatial shell to the relationship.

Configure `NGRAM_TELEGRAM_ALLOWED_USER_IDS` to restrict the intended audience and `NGRAM_TELEGRAM_OPERATOR_IDS` for operator controls. These can also be configured in the platform's `allowed_user_ids` and `operator_user_ids` lists. Keep personal identifiers in your private deployment configuration.

## Useful commands

| Command                          | Behavior                                                     |
| -------------------------------- | ------------------------------------------------------------ |
| `/commands`                      | Browse the command catalog                                   |
| `/status`, `/body`, `/feelings`  | Inspect runtime and body state                               |
| `/journal`, `/memories`, `/me`   | Inspect journal, retained episodes, and relationship context |
| `/models`, `/tools`, `/routines` | Inspect inference, registry, and scheduled work              |
| `/context`, `/compact status`    | Inspect approximate working-context usage                    |
| `/compact`                       | Summarize older conversation context                         |
| `/reset`                         | Clear the live conversation while preserving durable memory  |
| `/pause`, `/resume`              | Operator controls for shared Entity inference                |
| `/whoami`                        | Inspect your person identifier                               |

Automatic compaction reports progress in the chat. Manual compaction runs without blocking incoming control updates, so an operator can pause while a summary is being generated.

## Body command

`/body` reads the body representation rather than asking the model to invent a state report. Treat it as simulated runtime state, not a measurement of subjective experience.

## Busy indicator

`/busy on`, `/busy off`, and `/busy status` control the chat's busy indicator. `/wakequiet on` suppresses visible wake activity. These settings affect presentation; they do not pause model use.

## Media and groups

The adapter can pass supported image and audio inputs to the harness. Actual perception depends on the model and media-processing configuration. Test those paths separately from text chat.

In groups, response routing depends on mentions, replies, and configured behavior. Review bot permissions and access settings before inviting the Entity into a shared conversation.

The direct `/pause` command is the inference stop control. `/session_stop` belongs to remote desktop sessions and does not stop the Entity worker.
