# Orb bot examples

Each example is a complete bot. They need an app token (see [the developer guide](/docs/orb-bot-developer-guide.md)) and the address of your Orb:

```bash
export ORB_URL=https://your-orb.example
export ORB_BOT_TOKEN=orbbot_...
```

| Example | What it shows | Run |
| --- | --- | --- |
| [`echo.mjs`](echo.mjs) | the smallest useful bot: mentions and `/echo`, `/ping` with the SDK, no public address needed | `node examples/bots/echo.mjs` |
| [`webhook.mjs`](webhook.mjs) | the same bot as a signed webhook server, for an app whose endpoint URL points at your server | `PORT=8080 node examples/bots/webhook.mjs` |
| [`poll.py`](poll.py) | no SDK, no dependencies: the whole event loop with Python's standard library | `python examples/bots/poll.py` |
| [`curl.sh`](curl.sh) | the API with nothing but curl | `sh examples/bots/curl.sh CHANNEL_ID` |

A bot that fetches its events (no endpoint URL) can run on a laptop. A bot with an endpoint URL needs a public `https` address; for local work use fetching and switch later.
