# Connect TutorClaw to Your Phone

Learn how to safely connect your phone chat to TutorClaw so you can chat with your personal AI assistant using Telegram. 

*Note: Phone chat is optional and requires setup before use.*

For a detailed look at upcoming communication features, see the [TutorClaw Phone and Alerts Plan](./tutorclaw_phone_and_alerts_plan.md).

---

## 🚫 WhatsApp is Not Supported
This installed version of TutorClaw does not support WhatsApp for phone chat. Telegram is the only supported phone-chat method because it is simpler and safer to set up for this local TutorClaw package. If you attempt to connect WhatsApp, it will not work. To use TutorClaw on your phone, please follow the Telegram setup guide below.

---

## 1. What Phone Chat Does
Phone chat allows you to communicate with your TutorClaw assistant directly from your mobile device. Instead of sitting at your computer or opening a browser dashboard, you can simply send a message in Telegram on your phone. TutorClaw will process your message on your local computer and send a reply back to your phone.

---

## 2. What You Need Before Starting
Before setting up phone chat, make sure you have:
- A working TutorClaw installation on your computer.
- A Telegram account and the Telegram app installed on your phone.
- An active internet connection on both your computer and your phone.

*Note: Phone chat may involve Telegram or another outside messaging service. TutorClaw does not claim perfect privacy, and message transmission relies on third-party servers. Do not send passwords, financial details, medical records, or highly sensitive information through phone chat.*

---

## 3. How Telegram and @BotFather Fit In
Telegram allows anyone to create "bots"—automated accounts that can send and receive messages. We use @BotFather, Telegram's official bot creator, to make a new private bot for your assistant.
- You ask @BotFather to create a new bot.
- @BotFather gives you a unique string of characters called a **Bot Token**.
- This Bot Token acts as a username and password for your bot, letting TutorClaw control it.

> [!IMPORTANT]
> **Bot tokens should stay private.** Anyone who has your Bot Token can read the messages sent to your bot, write replies as your bot, and access your running TutorClaw assistant. Never share your Bot Token publicly.

---

## 4. Why TutorClaw Needs the Allowed Telegram User ID
By default, anyone on Telegram could search for your bot's username and try to message it. To protect your privacy and your computer, TutorClaw uses a strict whitelist so **only the approved user ID should be allowed**:
- Your Telegram account has a unique, numeric User ID.
- During setup, TutorClaw records your specific User ID in its settings.
- If anyone else attempts to message your bot, TutorClaw checks their User ID, rejects the message, and ignores them completely.

---

## 5. Phone Chat Shortcuts
TutorClaw includes simple Windows shortcut batch files in the project root to help you manage your connection:

*   **Check Phone Chat Status.bat:** Use Check Phone Chat Status.bat to see whether phone chat appears configured. (This performs local checks only and does not contact Telegram).
*   **Test Phone Chat.bat:** Use Test Phone Chat.bat to send one safe test message to your approved phone account. (This sends only a fixed, hardcoded message to verify the connection; it does not send conversation history, edit your configuration, or launch the background bridge).
*   **Start Phone Chat.bat:** Use Start Phone Chat.bat to start the phone chat listener.
*   **Restart Phone Chat.bat:** Use Restart Phone Chat.bat if phone chat seems stuck. Close any old phone chat window first. (This guides you to close old terminal windows manually; it does not attempt to kill any running processes on your system).

---

## 6. How to Stop Phone Chat
There is not yet a separate safe Stop Phone Chat.bat. For now, stop phone chat by closing the Phone Chat window or pressing **Ctrl+C** inside that window. Do not try to manually kill Python processes.

---

## 7. Future Alert and Shortcut Features
A future version of TutorClaw may include the following shortcuts and alert features:
- **Stop Phone Chat** shortcut file
- **Turn Alerts On / Off** (phone alerts are optional and will be under your control)
- **Test Phone Alert**
- **Test Computer Alert**

For safety, phone alerts will be designed to be rare and will never include sensitive personal information or passwords.

