Problem or Use Case
Summary
Add a LINE Messaging API gateway adapter for Hermes Agent.
Motivation
LINE has over 200M monthly active users across Asia and is the dominant messaging platform in Taiwan, Japan, and Thailand, but Hermes Agent currently does not support it as a gateway platform.
I’m building a LINE bot for a family insurance brokerage business in Taiwan, so this is not just a theoretical integration.
I have a real production use case to validate it end-to-end.
Proposed Solution
Add a native LINE Messaging API adapter under gateway/platforms/line.py, following the existing gateway platform adapter pattern.
The implementation would likely:
- accept LINE webhook events
- verify the
X-Line-Signature header before processing
- normalize incoming LINE events into Hermes gateway message handling
- use reply tokens for standard replies
- fall back to the Push Message API when a reply token has expired
- support basic access control via
LINE_ALLOWED_USERS
Likely files involved:
gateway/platforms/line.py
gateway/run.py
gateway/config.py
.env.example
tests/test_line_adapter.py
website/docs/user-guide/messaging/line.md
- potentially
pyproject.toml for an optional LINE SDK dependency
Potential environment variables:
LINE_CHANNEL_SECRET
LINE_CHANNEL_ACCESS_TOKEN
LINE_ALLOWED_USERS
Alternatives Considered
I considered a few alternatives:
-
Using the existing Webhook adapter as a workaround
- This might work for a one-off use case, but it would duplicate gateway logic instead of integrating cleanly with Hermes' existing platform architecture.
-
Waiting to see if someone else implements it
- I checked the current Issues list and didn’t find an existing feature request for LINE gateway support.
-
Not adding LINE support at all
- That would keep the gateway simpler, but it would leave out a major messaging platform in Asia.
Because Hermes already has a multi-platform gateway architecture, a native LINE adapter seems like the most maintainable approach.
Feature Type
Gateway / messaging improvement
Scope
Large (new module or significant refactor)
Contribution
Problem or Use Case
Summary
Add a LINE Messaging API gateway adapter for Hermes Agent.
Motivation
LINE has over 200M monthly active users across Asia and is the dominant messaging platform in Taiwan, Japan, and Thailand, but Hermes Agent currently does not support it as a gateway platform.
I’m building a LINE bot for a family insurance brokerage business in Taiwan, so this is not just a theoretical integration.
I have a real production use case to validate it end-to-end.
Proposed Solution
Add a native LINE Messaging API adapter under
gateway/platforms/line.py, following the existing gateway platform adapter pattern.The implementation would likely:
X-Line-Signatureheader before processingLINE_ALLOWED_USERSLikely files involved:
gateway/platforms/line.pygateway/run.pygateway/config.py.env.exampletests/test_line_adapter.pywebsite/docs/user-guide/messaging/line.mdpyproject.tomlfor an optional LINE SDK dependencyPotential environment variables:
LINE_CHANNEL_SECRETLINE_CHANNEL_ACCESS_TOKENLINE_ALLOWED_USERSAlternatives Considered
I considered a few alternatives:
Using the existing Webhook adapter as a workaround
Waiting to see if someone else implements it
Not adding LINE support at all
Because Hermes already has a multi-platform gateway architecture, a native LINE adapter seems like the most maintainable approach.
Feature Type
Gateway / messaging improvement
Scope
Large (new module or significant refactor)
Contribution