https://github.com/yazelin/linebot-ai-starter
Starter template for LINE Messaging API bots with AI provider adapters and FastAPI webhook deployment.
https://github.com/yazelin/linebot-ai-starter
ai-agent fastapi line-bot llm starter-template
Last synced: 6 days ago
JSON representation
Starter template for LINE Messaging API bots with AI provider adapters and FastAPI webhook deployment.
- Host: GitHub
- URL: https://github.com/yazelin/linebot-ai-starter
- Owner: yazelin
- Created: 2026-06-01T17:35:13.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2026-06-10T10:48:28.000Z (19 days ago)
- Last Synced: 2026-06-10T12:22:06.621Z (19 days ago)
- Topics: ai-agent, fastapi, line-bot, llm, starter-template
- Language: HTML
- Homepage: https://yazelin.github.io/linebot-ai-starter/
- Size: 371 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# LINE Bot AI Starter
A minimal LINE Messaging API bot with AI provider adapters.
## 繁中定位
**LINE Bot AI 入門模板** 面向台灣繁中受眾。
- 主要受眾:適合想用 LINE 做客服、訂單、點餐、內部通知或群組助理的台灣團隊。
- 核心承諾:把 LINE 官方帳號或群組變成可接 AI、可接資料、可部署的工作流入口。
- CTA 頁:https://yazelin.github.io/linebot-ai-starter/
## 公開教學文件
這個 repo 的教學內容直接公開,讓你可以先自己照著跑;如果需要手把手 debug、改成你的公司或個人場景,再考慮工作坊或顧問協助。
- 網頁版教學:https://yazelin.github.io/linebot-ai-starter/tutorial.html
- Markdown 教學:[`docs/`](docs/)
- 快速開始:[`docs/01-quickstart.md`](docs/01-quickstart.md)
- 常見踩雷:[`docs/05-common-pitfalls.md`](docs/05-common-pitfalls.md)
- 後半段(SDK 對照組):docs/08-line-bot-sdk-comparison.md
## Who this is for
Teams in Taiwan/Japan that want LINE-based AI workflow assistants.
## Features
- FastAPI LINE webhook
- Signature verification
- Echo / Claude CLI / Gemini CLI / HTTP providers
- Docker-ready
- 官方 line-bot-sdk 版同功能重寫(optional `sdk` extra)— 見 `docs/08-line-bot-sdk-comparison.md`
## Quick start
本專案用 [uv](https://docs.astral.sh/uv/) 管理依賴與虛擬環境(pyproject.toml + uv.lock)。
先安裝 uv(一次就好):
Ubuntu / macOS:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Windows(PowerShell):
```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
裝完重開終端機,`uv --version` 印得出版本就 OK。
取得專案、裝依賴、跑起來(以下 `uv sync` / `uv run` 在 Ubuntu 與 Windows 完全相同):
```bash
git clone https://github.com/yazelin/linebot-ai-starter.git
cd linebot-ai-starter
uv sync
uv run uvicorn app.main:app --reload --port 8000
```
`uv sync` 會依 pyproject.toml + uv.lock 自動建立 `.venv` 並裝好套件(毋須手動 venv/activate);`uv run` 直接在那個環境裡執行。加新套件用 `uv add <套件>`。
> 沒裝 uv 的話 `pip install .` 也能裝,但本教學以 uv 為主。
### 後半段:官方 SDK 版(對照組)
```bash
uv sync --extra sdk
PYTHONPATH=. LINEBOT_SMOKE_TARGET=app.main_sdk uv run python parity_smoke_test.py # 同一份測試也過
uv run uvicorn app.main_sdk:app # 啟動 SDK 版
```
See the source files and `.env.example` for the minimal runnable path.
## Learn / get help
This repo is also a CTA page for workshops and consulting:
- GitHub Pages: https://yazelin.github.io/linebot-ai-starter/
- Contact: yazelin@ching-tech.com
## License
MIT
## Brand / CTA design
- Landing page: https://yazelin.github.io/linebot-ai-starter/
- CI spec: [DESIGN.md](DESIGN.md)
- Banner: [assets/banner.svg](assets/banner.svg)
- Logo: [assets/logo.svg](assets/logo.svg)
---
## 關於作者
這個範本由 **林亞澤(Yaze Lin)** 維護 — 出身機電自動化系統整合,現在把同一套工程方法用在 AI 產品上。
- 任職於 **擎添工業 ChingTech**(1984 年成立的機電自動化公司:PLC 程式、機械手臂、AGV 無人搬運、半導體封測/PCB/面板/光學產線整合)。
- 技術筆記與更多範例:[yazelin.github.io](https://yazelin.github.io) · GitHub [@yazelin](https://github.com/yazelin)
## 從範本到正式產品
> 你正在看的 LINE Bot 範本,正式上線版就是 CTOS-Lite / CT JINN。
如果你想看同樣的想法做成正式、上線中的產品:
- **CTOS** — 企業 AI 工作平台:macOS 風格 Web 桌面、知識庫 RAG 檢索、產業專屬 Agent、LINE Bot 整合,資料留在台灣。[ching-tech.com](https://ching-tech.com) · [品牌站](https://ching-tech.github.io)
- **CTOS-Lite / CT JINN** — 把公司裝進 LINE 的個人版 AI 助理,加 LINE 即可試用:[@285fjkky](https://line.me/R/ti/p/@285fjkky)
- **Mori Desktop** — 個人 AI 管家桌面應用(Tauri 2 + Rust + React):[github.com/yazelin/mori-desktop](https://github.com/yazelin/mori-desktop)
- **AgentOS** — 跨 CLI 的 agent 治理平台(開發中)
> 想把這個範本落地成你公司的內部系統,或想上一堂從 0 到部署的課?
> 來信 yazelin@ching-tech.com,或追蹤上面的連結。