feat(skills): explain nanobot usage from bundled documentation (#6176)
* feat(skills): add nanobot documentation guide with bundled docs * docs: prefer graphical setup and align bundled guides with runtime * docs: lead provider setup with built-in endpoint defaults * fix: preserve documentation packaging and lookup across install paths * fix(skills): narrow documentation loading to relevant sections * refactor(skills): keep documentation guidance concise * fix(docs): complete first-use workflows and clarify runtime boundaries * style(docs): remove manual paragraph wrapping * docs: guide first-run users to conversational setup help * docs: fold README installation alternatives and details * docs: separate README alert marker from its body * docs: clarify README onboarding and runtime boundaries
This commit is contained in:
1 parent
23941355a8
commit
cd2a863710
61 files changed
+1729
-634
No files matched your search
@@ -11,36 +11,25 @@ This guide connects one Telegram bot to nanobot. Messages sent to that bot use y
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A working nanobot CLI reply:
|
||||
|
||||
```bash
|
||||
nanobot agent -m "Hello!"
|
||||
```
|
||||
- A normal reply in your existing nanobot WebUI or CLI. If you have not reached that point, complete [Quick Start](../quick-start.md) first.
|
||||
|
||||
- A Telegram account.
|
||||
- A bot token from `@BotFather`.
|
||||
- A bot token: open Telegram, find `@BotFather`, send `/newbot`, follow its name/username prompts, and copy the returned token. Keep the token private.
|
||||
|
||||
## Install nanobot
|
||||
## Continue from your running instance
|
||||
|
||||
```bash
|
||||
python -m pip install nanobot-ai
|
||||
nanobot onboard --wizard
|
||||
```
|
||||
If you are already chatting in the WebUI, keep it open and continue below. It has already started the gateway. To reopen it later, use the same installation's `nanobot webui` command; there is no need to install nanobot again.
|
||||
|
||||
For terminal or server setup, use the manual configuration section below. Reuse the config/home and executable from your working instance. Docker users should use the [container commands](../deployment.md#docker-compose).
|
||||
|
||||
## Connect Telegram in the WebUI
|
||||
|
||||
Start the WebUI:
|
||||
|
||||
```bash
|
||||
nanobot webui
|
||||
```
|
||||
|
||||
Open **Settings → Channels → Telegram**:
|
||||
Open **Channels → Telegram**:
|
||||
|
||||
1. If Telegram support is not installed, turn on its switch and confirm the installation.
|
||||
2. Paste the token from BotFather.
|
||||
3. If the gateway cannot reach Telegram directly, expand **Advanced** and enter an HTTP or SOCKS proxy such as `http://127.0.0.1:7890`.
|
||||
4. Save and enable Telegram.
|
||||
4. Save and enable Telegram. For a first private setup, leave the sender allowlist empty: new senders must pair before they can use the agent. Do not set it to `*`.
|
||||
|
||||
The configuration badge appears as soon as a bot token is saved. A connection check is separate: if Telegram is temporarily unreachable, the saved configuration remains valid and the bot can continue working in environments where the gateway has network access.
|
||||
|
||||
@@ -48,6 +37,9 @@ Saved tokens and proxy URLs are masked. A proxy entered here is used both for th
|
||||
|
||||
## Manual setup
|
||||
|
||||
<details>
|
||||
<summary>Manual configuration</summary>
|
||||
|
||||
For a headless installation, install Telegram support:
|
||||
|
||||
```bash
|
||||
@@ -74,14 +66,13 @@ Omitting `allowFrom` enables pairing-only mode. The first DM from a new user get
|
||||
|
||||
Telegram uses long polling by default. Webhook mode is available for public HTTPS deployments; start with long polling for the first test.
|
||||
|
||||
## Run nanobot gateway
|
||||
</details>
|
||||
|
||||
```bash
|
||||
nanobot channels status
|
||||
nanobot gateway
|
||||
```
|
||||
## Apply the settings
|
||||
|
||||
Leave the gateway running while you test messages.
|
||||
In the WebUI, follow any restart prompt and keep the launcher running for the first test. You do not need to start another gateway. For unattended operation afterward, use [background or service mode](../cli-reference.md#gateway).
|
||||
|
||||
For manual config changes, restart the existing gateway through its owning terminal, `nanobot gateway restart` for background mode, or its service/container supervisor. If none is running, start `nanobot gateway` and leave it running. Run diagnostic CLI commands in a separate terminal using the same installation and config.
|
||||
|
||||
## Test a message
|
||||
|
||||
@@ -91,13 +82,22 @@ Open Telegram, DM the bot, and send:
|
||||
Hello from Telegram
|
||||
```
|
||||
|
||||
The bot should reply with a pairing code. Approve it from an already trusted surface, such as the local CLI:
|
||||
The bot should reply with a pairing code. Return to the WebUI pairing prompt and enter the code from your own Telegram private chat. Do not approve codes from other people. An unapproved sender receives a code, not an agent reply.
|
||||
|
||||
<details>
|
||||
<summary>Terminal-only pairing</summary>
|
||||
|
||||
In a separate local terminal, using the same instance:
|
||||
|
||||
```bash
|
||||
nanobot agent -m "/pairing approve ABCD-EFGH"
|
||||
```
|
||||
|
||||
Send the message again after approval. The reply should use the same model and workspace as your local CLI check.
|
||||
Replace the example code with your actual code.
|
||||
|
||||
</details>
|
||||
|
||||
Send the message again after approval. Confirm that your private chat now receives a normal agent reply.
|
||||
|
||||
## Security notes
|
||||
|
||||
@@ -111,7 +111,7 @@ Send the message again after approval. The reply should use the same model and w
|
||||
- If the channel is not listed, run `nanobot plugins enable telegram` again in the same Python environment.
|
||||
- If the WebUI shows a saved configuration but the live check cannot reach Telegram, the token is still saved. Confirm the gateway can reach `api.telegram.org`, or open **Advanced → Network proxy** and enter a proxy.
|
||||
- If Telegram rejects the token, copy the current token from BotFather or regenerate it.
|
||||
- If messages do not arrive, run `nanobot gateway --verbose` and confirm the Telegram channel is enabled.
|
||||
- If messages do not arrive, check the Telegram runtime status in **Channels** and the logs of the running gateway. Confirm it is enabled and can reach Telegram; do not start a second gateway to diagnose the first.
|
||||
- If a first DM returns a pairing code, that is expected. Approve the code before testing normal agent replies.
|
||||
- If Telegram Web shows unsupported rich messages, keep `richMessages` disabled.
|
||||
|
||||
|
||||
Reference in new issue
Block a user