Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
mastraとassistant-uiを使い15分で作るai-chat
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yuta Nishimori
April 06, 2025
36
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
mastraとassistant-uiを使い15分で作るai-chat
https://teratail.connpass.com/event/348281/
Yuta Nishimori
April 06, 2025
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
A designer walks into a library…
pauljervisheath
211
25k
Designing for Performance
lara
612
70k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
KATA
mclloyd
PRO
35
16k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Accessibility Awareness
sabderemane
1
250
Making the Leap to Tech Lead
cromwellryan
135
10k
Transcript
mastraとassistant-uiを使い 15分で作るai-chat (バックエンドTypeScript勉強会) Yuta Nishimori 2025/03/08 1 1
自己紹介 Yuta Nishimori (@YniHun / nyuta01) 株式会社Macbee Planetにて広告の配信基盤やデータ分 析の他、LLMを用いた営業の効率化の開発を担当。 また、株式会社カルノーにて、LLMを用いたAIワークフ
ローの開発をリード。 2 2
今日話すこと mastraとassistant-uiを用いた、効率的なagent開発 3 3
注意 今回作成するチャットはあくまでデモ用です 4 4
Demo Github 5 5
概要 next.jsでベースプロジェクトを作成 assistant-uiでchat画面を作成 mastraでagentを導入 agentにイベント取得用toolを追加 agentにイベント詳細取得用toolを追加 UI/UXをブラッシュアップ 6 6
構成 7 7
実装 8 8
next.jsでベースプロジェクトを作成 9 9
10 10
11 11
assistant-uiでchat画面を作成 document 12 12
13 13
src/app/page.tsx 14 14
src/app/api/chat/route.ts 15 15
16 16
mastraでagentを導入 document 17 17
18 18
19 19
src/mastra/index.ts 20 20
Agentを作成 src/mastra/agents/analyzer.ts 21 21
作成したagentを登録 src/mastra/index.ts 22 22
chat apiから実行 src/app/api/chat/route.ts 23 23
24 24
agentにイベント取得用Toolを追加 document 25 25
mastra/tools/get-events.ts 26 26
agentにtoolを登録 mastra/agents/analyzer.ts 27 27
28 28
agentにイベント詳細取得用Toolを追加 composio経由でfirecrawlを実行し、スクレイピングする 29 29
Firecrawl Power your AI apps with clean data crawled from
any website. It's also open source. https://www.firecrawl.dev/ 30 30
Composio https://composio.dev/ 31 31
document 32 32
src/mastra/tools/scrape-url.ts 33 33
src/mastra/agents/analyzer.ts 34 34
35 35
UI/UXをブラッシュアップ 実行中のToolを確認できるようにする 36 36
37 37
src/app/components/assistant-ui/tool-ui.tsx 38 38
src/app/assistant.tsx 39 39
fin. 40 40
まとめ TypeScript(NextJS)のエコシステムを活用することで効 率的なAgent開発が可能 mastraには今回紹介した機能の他にWorkflowや RAG/MemoryといったAgent開発において必要となる機 能が揃っている assistant-uiを活用することで独自のchatUIを効率的に構 築できる composioを活用することで外部サービスとの接続を高速 に実現できる
41 41
最後に 今後重要になるのは ビジネスワークフローのエンジニアリング techとbizの境界線をなくす 42 42