Skip to content
ErawanACADEMYไทย

Hermes Agent

Hermes in your LINE chats — add a friend and give it work

An assistant that remembers your work is most useful within reach, and for most people in Thailand that means LINE. This lesson puts Hermes Agent there two ways. On Erawan's account you create the app, enter one key, scan a QR code and start talking, without opening LINE Developers once. On your own Official Account it answers with your shop's name and picture.

Rather not set it up yourself? Erawan sets up Hermes Agent for free on Hobby and above.

An assistant in the same chat as your work

In the first Hermes Agent lesson you talked to Hermes in its own web page, which is fine at a desk. Most work turns up while you are holding your phone, though. Put Hermes on LINE and you give it jobs from the app you have open all day, and the jobs you schedule send their results back as LINE messages.

It is the same Hermes as on the web: its memory, its skills and its scheduled jobs all work as before. Only the place you talk to it changes.

Pick the way that suits you

Erawan offers Hermes on LINE two ways. The difference is whose LINE account answers.

  • LINE, on Erawan's account — nothing to set up at LINE: add a friend and send a code. The chat says Erawan Hermes Agent, only people who send a code from your app's page can talk to it, and there is one per Erawan account.
  • LINE, on your own Official Account — Hermes answers with your account's name and picture. You turn on the Messaging API and copy three values from LINE Developers; only the LINE user IDs you list can talk to it, and each Official Account serves one app.

To try it today, start with the first: it takes a few minutes. The second is for when you want the assistant to answer in your own shop's name. Both use the same OpenRouter API key as the first lesson; if you do not have one yet, follow step 2 of that lesson first.

Way 1 — LINE, on Erawan's account

Step 1 — Create Hermes the LINE way

Open the Hermes Agent on LINE page. Without an Erawan account you are taken through signing up and brought back.

The page offers Hermes three ways under “Choose how”, and the link above has already chosen LINE, on Erawan's account. Press Deploy Hermes Agent on the right.

The Hermes Agent template page in the Erawan console: Choose how, with three ways, LINE on Erawan's account chosen, and the Deploy Hermes Agent button on the right

Choose “LINE, on Erawan's account” and press “Deploy Hermes Agent”; what the app will ask for, below, is only your OpenRouter API key

From App templates in the console, press the Hermes Agent card and choose the same way.

Step 2 — Enter your OpenRouter API key

The app's page opens on its Variables tab. There is one value for you to enter, OPENROUTER_API_KEY, marked as not set while the app waits for secrets: press Set value and paste the key that starts sk-or-v1-.

The username and password for Hermes' web page are made by Erawan. If you only use LINE, leave them alone.

The Variables tab of the hermes-agent-line app waiting for secrets: the username and password made by Erawan when the app was created, the OpenRouter API key not set with a Set value button, and six environment variables for the bot below

The one row not set is your OpenRouter API key. The key goes in here and nowhere else — never into a chat with any AI. Once it is saved, the app builds on its own

To name the bot or change the model from the start, change it under Environment Variables, below the secrets, before saving the key — see “Name it and set its manner” below. Not sure yet? Keep the defaults and change them later.

The Variables tab after the key is saved: the app building, every secret set, the bot renamed ช้าง, and a notice that your app is opening

Key saved, and the status turns to building. Here the bot was named “ช้าง” (elephant) before the key went in, so it starts with that name. Leave the page open: the QR code opens by itself when the app is ready

Step 3 — Scan the QR, add the friend, send the code

When the app is ready, its page opens “Your app is ready — add it on LINE” by itself. If you closed the page, press Connect LINE on the LINE card of the overview. Then:

  1. Scan the QR code with your phone's camera.
  2. Add Erawan Hermes Agent as a friend.
  3. LINE has typed the code into the chat for you. Press send.

The window Your app is ready — add it on LINE, with a QR code, three steps and an eight-character code

The QR code and the code in this picture are an expired example; your app gets its own

Opened on a phone, the window has an Open LINE button instead of the QR code. A code works once, for 15 minutes; ask for another when it runs out.

Once you send it the window says “Connected”, and Hermes is in your LINE.

The window Connected — say something to it on LINE, with a check mark and a Done button

Code sent: the window turns to “Connected” by itself, no refresh needed. Press “Done” and say hello to Hermes on LINE

The overview of the hermes-agent-line app, running, with a LINE card that says 1 connected and an Another code button

The LINE card on the overview says how many people are connected. “Another code” adds a second phone, or somebody on your team

Somebody who adds the account without a code from your app's page cannot reach your Hermes. An unused code is a key: give it only to people you want talking to Hermes.

Say something, and Hermes greets you with a few examples as buttons to try. Scheduled jobs send their results to this chat by themselves; there is no command to type. Send “เมนู” (menu) at any time to see what you can ask for, as buttons.

Way 2 — LINE, on your own Official Account

Here Hermes answers with the name and picture of a LINE Official Account you made, but only to the people on the list you give it. Anyone else gets silence. Hermes this way is an assistant for you and your team, not a bot that answers customers.

If your shop's account is already connected to a chatbot or another system by webhook, that system stops receiving messages the moment you connect the account to Hermes. The safe way is a new Official Account just for Hermes; making one at LINE Official Account Manager is free.

Step 1 — Turn on the Messaging API

In LINE Official Account Manager, open Settings → Messaging API and press Enable Messaging API. It asks for a provider, which cannot be changed later, so choose with care.

Then in Response settings, turn auto-reply off and the webhook on. Left on, auto-reply answers alongside Hermes, and every message gets two replies.

Step 2 — Copy three values from LINE Developers

In the LINE Developers Console, choose the same provider and open its Messaging API channel. Everything you need is on the Basic settings tab.

In LINE Developers

Looks like

Channel ID

ten digits

Channel secret

32 letters and digits

Your user ID

U followed by 32 characters

Use the Messaging API channel's. If the same provider has a LINE Login channel, its secret looks exactly the same, and LINE refuses it.

Step 3 — Create the app and enter everything on its page

Open the Hermes Agent on your own LINE Official Account page, or press the Hermes Agent card and choose LINE, on your own Official Account. Press Deploy Hermes Agent and fill in four values on the Variables tab.

Value

What goes in

OPENROUTER_API_KEY

your OpenRouter API key

LINE_OA_CHANNEL_ID

the Channel ID

LINE_OA_CHANNEL_SECRET

the Channel secret

LINE_ALLOWED_USERS

your user ID; for your team too, each person's user ID, separated by commas

There is no webhook URL to copy. Once the Channel ID and secret are both saved, Erawan sets the webhook at LINE itself and checks that the account is ready for messages. If LINE refuses the secret, the app stops building and says why; anything else not ready, such as Use webhook still off, shows as a warning on the app's LINE card.

When the app is up, the LINE card on the overview shows your account's name and an Add friend link. Add it from the LINE account whose user ID you listed, say something, and Hermes answers in your account's name.

To move to another Official Account later, change the Channel ID and secret on the app's page. There is no new app to create.

Name it and set its manner

Both ways are set up in the same place: Environment Variables on the Variables tab, each row with a description. Change a value and press Save & Restart; the app starts again with it.

  • The bot's name (HERMES_BOT_NAME) — what it calls itself. Starts as Hermes Agent.
  • How it should behave (HERMES_INSTRUCTIONS) — such as “answer in Thai, short and friendly”. Starts empty.
  • The model it thinks with (HERMES_DEFAULT_MODEL) — by its OpenRouter name. Starts as openai/gpt-6-luna.
  • How hard it thinks (HERMES_REASONING_EFFORT) — none, low, medium or high: lower is faster and cheaper, higher is more thorough. Starts as medium.
  • System messages on LINE (HERMES_SYSTEM_MESSAGES) — on shows each step Hermes takes, every one its own message, so the chat gets much longer. Starts off.
  • Timezone for scheduled tasks (HERMES_TIMEZONE) — starts as Asia/Bangkok.
  • Language of its own messages and buttons (HERMES_LANGUAGE) — th or en. Starts as th.

Hermes' web page still opens at the app's address. Secrets cannot be read back, so to sign in, press Replace on the username and password and set your own.

A first job on LINE

  1. Tell it about your work — “Remember that my shop sells coffee, open 8am to 5pm, closed Mondays. Draft three replies for customers asking how long delivery takes.”
  2. Give it a routine — try “Every Friday at 5pm, remind me to sum up the week's sales, here in this chat.”
  3. Pick up where you left off — the next day, ask “What day is my shop closed?” and see whether it remembers.

On a job that takes a while, Hermes first says it is still thinking, with a button. Wait a moment, press it, and the full answer follows.

What it costs, and what keeps it safe

  • The app on Erawan — the Hobby plan, the same as Hermes on the web: ฿99 a month at the launch price. On a free account it runs for 30 days from your first app's deploy. See every plan
  • The model — paid to OpenRouter by use, within the limit you set on the key.
  • LINE's keys are not in the app — the account's real token stays with Erawan's LINE service; the app holds a token that works for this app alone.
  • No messaging everybody at once — broadcasting to every friend of the account is closed, because an agent is the kind of program a stranger's message can talk into doing that.

Its memory, your conversations and the skills it builds live in your app's own storage, exactly as with Hermes on the web.

Once the friend is added, hand Hermes one small job you do every day.

All Erawan Solution lessons