Crescendo Lab

LINE OA × Codex · Agent Lab

Connect your LINE OA
from Codex.

Add LINE OA MCP to Codex and say "connect my LINE OA to AI". Codex creates the connection, sends you a secure page for the channel, sets how the AI answers and confirms the first reply; it answers test users until you approve every friend.

Connect my AISee the setup

Why connect LINE from Codex

Codex does the setup, you keep the keys

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.

Your options

Codex with LINE OA MCP, or a bot it codes from scratch

Scroll the table sideways.

Connecting LINE from Codex through LINE OA MCP compared with coding a bot
What you care aboutCodex + LINE OA MCPCodex codes a LINE bot
What you doSay one sentence, fill in a secure pageHave it write a webhook, deploy it, configure LINE Developers
Channel SecretCodex never sees itHanded to the AI or written into config
Webhook URLSet and verified for youDeploy and paste it into the LINE console yourself
Going liveTest users first, every friend after you approveWrite it yourself
Changing answersEdit the instructions; the next message followsChange code and redeploy

Steps

Connect LINE from Codex 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. Add it to Codex

    Put the setup below in ~/.codex/config.toml and the agent token in LINE_AGENT_SDK_TOKEN, then restart Codex.

  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 Codex to LINE OA MCP

Replace <org> with your Agent Lab organization. The token stays in the environment; never write it into the file or paste it into the chat.

Copy

~/.codex/config.toml

[mcp_servers.line-oa-mcp]
url = "https://line-oa-mcp--<org>.hosting.agentlab.run/mcp"
bearer_token_env_var = "LINE_AGENT_SDK_TOKEN"
  • LINE_AGENT_SDK_TOKEN the agent token from the panel's Agent tokens page.
  • line_* ten tools: connect, read progress, set the instructions, request going live, read messages, sandbox and more.
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 with Codex: questions

Can Codex connect a LINE Official Account by itself?
Yes, with LINE OA MCP. Codex creates the connection and follows whose turn each step is; the steps LINE requires of a person, such as entering the channel or approving every friend, come back to you as links. LINE OA MCP tools →
How do I change how the bot answers from Codex?
Tell Codex what to change. It updates the instructions (up to 4,000 characters) with line_configure_bot, and the next message follows them; it can also turn AI replies off.
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.