Crescendo Lab

LINE AI chatbot guide · Agent Lab

A LINE AI chatbot,
set up by your AI.

Let AI answer your LINE Official Account: questions, order lookups, bookings. Your AI tool connects it through LINE OA MCP and tests the first message; it answers test users until you approve every friend.

Connect my AISee the setup

What a LINE AI chatbot does

Customers ask on LINE, AI answers in the same chat

Answers from your instructions

Describe its role, what it knows and what it must not do in plain words; the next message follows it.

Test users first

It answers your paired test account until you approve answering every friend, signed in.

Secrets stay out of the chat

The Channel ID and Secret go on the service's own page; the AI tool never sees them.

Replies don't use your quota

On LINE's plans replies are free; it replies first and pushes only when the reply window has passed.

Three ways

How to build a LINE AI chatbot

Scroll the table sideways.

Three ways to answer a LINE Official Account automatically
What you care aboutYour AI tool + LINE Agent SDKCode a LINE bot yourselfBuilt-in auto-response
CodingNone; tell your AI tool what you wantWebhook, signature check, repliesNone
How it answersAI, from your instructions and dataWhatever you codeKeywords you set
Server and webhookRuns on Agent Lab with a fixed HTTPS URLYours to host; ngrok while testingNot needed
Going liveTest users first, every friend after you approveUp to youEvery friend once saved
Channel SecretEntered on a secure pageKept by youNot needed

Steps

Connect AI to LINE in four steps

  1. Set up LINE OA MCP

    Run it on Agent Lab from the setup guide, sign in to its panel and create an agent token.

  2. Connect your AI tool

    Add LINE OA MCP to Claude Code, Codex, Cursor or Gemini CLI with the token in an environment variable.

  3. Enter the channel on the secure page

    Your AI tool gives you a link. Enter the Channel ID and Secret there; no long-lived token needed. No Official Account yet? Try the shared sandbox.

  4. Test, then approve

    Chat from your test account and tune the instructions. When it's ready, approve answering every friend.

Setup

Connect Claude Code to LINE OA MCP

Other tools take the same URL and Authorization header; see their pages below.

Copy

.mcp.json

{
  "mcpServers": {
    "line-oa-mcp": {
      "type": "http",
      "url": "https://line-oa-mcp--<org>.hosting.agentlab.run/mcp",
      "headers": { "Authorization": "Bearer ${LINE_AGENT_SDK_TOKEN}" }
    }
  }
}
  • LINE_AGENT_SDK_TOKEN the agent token from the panel's Agent tokens page, kept in an environment variable.
  • Channel ID / Secret entered on the secure page, never in the chat.
Prompt

Then say this

Read https://agentlab.cresclab.com/line-agent-sdk.md and connect my LINE Official Account to AI. Answer only my test account for now. It's the front desk of my café: answer opening hours and menu questions; for bookings, ask for name, date and party size. Give me a secure link for anything I need to enter.

FAQ

LINE AI chatbot: questions

How do I build AI customer service on a LINE Official Account?
Turn on the Messaging API for the Official Account so messages reach your agent through a webhook; the agent answers from your data and replies in LINE. With Agent Lab your AI tool walks you through connecting, deploys the webhook and checks the first message; the Channel Secret goes only on a secure page. Setup guide →
How do I connect a LINE bot to ChatGPT or Claude?
When the bot receives a message, the webhook calls a model for the answer and replies to the user. Agent Lab handles the webhook, signature check and reply; models go through the AI Gateway with one key instead of a key per provider. AI Gateway →
Can Hermes Agent, Dify or n8n connect to LINE?
Yes. Any of them can be the brain behind a LINE bot; LINE always goes through the Messaging API webhook, which needs a stable HTTPS URL and the channel's credentials. Host the tool on Agent Lab and point the webhook at it. Host a LINE bot →
Do I need to code?
No. Tell your AI tool what the account is for and how to answer; it calls LINE OA MCP to connect, set the instructions and test. You only sign in and approve the steps LINE requires of you.
Will the AI see my Channel Secret?
No. The Channel ID and Secret are entered on the service's own page, and the AI tool only gets an agent token from an environment variable. Never paste a secret into the chat. LINE OA MCP tools →
Can I try it without a LINE Official Account?
Yes. A shared sandbox gives you a join code: add it as a friend, send the code, and your AI answers you there. Creating a real Official Account is done by you in LINE Official Account Manager; LINE offers no API for it.
Do AI replies count toward LINE's message quota?
Under LINE's Official Account plans, replies to a user don't count toward the monthly message count; only push messages do. The agent replies by default and pushes only when the reply window has passed.