LINE
LINE
Start with meaning, then move to detail.
This lesson explains LINE as part of Hermes internals and extension points. You will learn what it does, when it matters, and the smallest safe test that proves it works.
If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?
For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.
For advanced readers, inspect How the bot responds, Step 1: Create a LINE Messaging API channel, Step 2: Expose the webhook port, then verify failure modes and version compatibility.
Know Python, Git, and basic project structure before changing code.
A clear outcome before you read.
- Understand LINE without assumed prior knowledge.
- Separate the source description from what still needs testing in your environment.
- Read the first command and identify its inputs and outputs before copying it.
Short definitions before the details.
- Gateway
- The process that connects Hermes to channels such as Telegram or Discord and routes messages.
- Automation
- Running work later or repeatedly with explicit success and failure conditions.
Set up Hermes Agent as a LINE Messaging API bot
What does the source say, and in what order?
- 01How the bot responds
Start here to understand the core idea or structure.
- 02Step 1: Create a LINE Messaging API channel
Read this after the foundation, then connect it to the previous step.
- 03Step 2: Expose the webhook port
Read this after the foundation, then connect it to the previous step.
- 04Step 3: Configure Hermes
Read this after the foundation, then connect it to the previous step.
- 05Step 4: Set the webhook URL
Read this after the foundation, then connect it to the previous step.
- 06Step 5: Run the gateway
Read this after the foundation, then connect it to the previous step.
- 07Slow LLM responses
Read this after the foundation, then connect it to the previous step.
- 08Cron / notification delivery
Read this after the foundation, then connect it to the previous step.
- 09Environment variable reference
Read this after the foundation, then connect it to the previous step.
- 10Troubleshooting
Finish here to verify the result and special cases.
Copy only after you understand the effect.
# Cloudflare Tunnel (recommended for production — fixed hostname)
cloudflared tunnel --url http://localhost:8646
# ngrok (good for dev)
ngrok http 8646
# devtunnel
devtunnel create hermes-line --allow-anonymous
devtunnel port create hermes-line -p 8646 --protocol https
devtunnel host hermes-lineThen in `~/.hermes/config.yaml`:That's enough — the bundled-plugin scan in `gateway/config.py` automatically picks up `plugins/platforms/line/`. No `Platform.LINE` enum edit, no `_create_adapter` registration.
---
## Step 4: Set the webhook URL
Back in the LINE console:
1. Open your channel → **Messaging API** tab.
2. Under **Webhook settings** → **Webhook URL**, paste `https://<your-tunnel>/line/webhook` (note the `/line/webhook` path — the adapter listens there).
3. Click **Verify**. LINE pings the URL; you should see a 200.
4. Toggle **Use webhook** to **On**.
---
## Step 5: Run the gatewayRead the first command and identify its inputs and outputs before copying it.
Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.