Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
izumin5210
December 23, 2025
Programming
6
1.8k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
December 23, 2025
Tweet
Share
More Decks by izumin5210
See All by izumin5210
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.5k
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
2.8k
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.6k
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
1.1k
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
5
870
複雑なフォームを継続的に開発していくための技術選定・設計・実装 #tskaigi / #tskaigi2025
izumin5210
15
9.6k
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
10
4.1k
複雑なフォームと複雑な状態管理にどう向き合うか / #newt_techtalk vol. 15
izumin5210
4
4.9k
Other Decks in Programming
See All in Programming
AI時代の認知負荷との向き合い方
optfit
0
140
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
MUSUBIXとは
nahisaho
0
130
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
240
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
6
1.9k
Package Management Learnings from Homebrew
mikemcquaid
0
200
dchart: charts from deck markup
ajstarks
3
990
CSC307 Lecture 02
javiergs
PRO
1
770
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
3
270
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
290
AgentCoreとHuman in the Loop
har1101
5
220
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
76
What's in a price? How to price your products and services
michaelherold
247
13k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
How to train your dragon (web standard)
notwaldorf
97
6.5k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Amusing Abliteration
ianozsvald
0
96
Evolving SEO for Evolving Search Engines
ryanjones
0
120
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Transcript
AI Agent Tool のための バックエンドアーキテクチャを考える 2025-12-23 Encraft #22 @izumin5210
@izumin5210 © LayerX Inc. whoami LayerX バクラク事業部 (2022-09 -) Platform
Engineering 部 Enabling チーム Staff Software Engineer バックエンドや Web フロントエンドが専門です AI は初心者 ISUCON14 4位 好きな AI SDK v6 の API は .toModelOutput()
今日の話のスコープ © LayerX Inc. LLM / Agent を プロダクトに組み込む とき
Backend は 何を単位に能力を提供するか 3
変化の出発点 Before 利用主体が 人間・決定論コード After 利用主体が Agent Agent は 考えながらタスクを進める主体
© LayerX Inc. 4
従来の AI 機能のバックエンドアーキテクチャ上の位置づけ © LayerX Inc. AI はリクエストツリーの 「葉」 に
単機能な complicated subsystem 呼び出し元がすべて決める AI は 制御フローを持っていなかった 5
AI Agent 機能のバックエンドアーキテクチャ上の位置づけ © LayerX Inc. AI が 制御フローに入ってくる 実行時に
分岐・再計画 ツリーの葉ではなく 根 / 節 に 6
AI Agent 機能のバックエンドアーキテクチャを考える © LayerX Inc. 7
Tool "a contract between deterministic systems and non-deterministic agents" "agents
have different ways of perceiving the potential actions they can take" Tool = Agent に開放する、ユースケース・目的に合わせた操作 © LayerX Inc. Anthropic, 2025, https://www.anthropic.com/engineering/writing-tools-for-agents 8
Tool 設計と API 設計の違い 従来の API 設計 for Backend/Frontend 開発者・システム向け
に書く Agent 向け Tool 設計 エージェントのため に設計する © LayerX Inc. メモリ豊富なシステムが相手 呼び出し側が手続きを組み立てる Limited context を持つ主体が相手 Agent がタスクを組み立てる Anthropic, 2025, https://www.anthropic.com/engineering/writing-tools-for-agents 9
シンプルなケース:単一ドメインのタスク © LayerX Inc. 単一ドメインの 意味あるタスク として Tool を呼ぶ 10
複数ドメインにまたがる場合 © LayerX Inc. 複数集約・複数操作を 束ねたタスク Agent からは 1 回の
Tool 呼び出し 内部では複数ステップが走る 11
実装パターン © LayerX Inc. 2つのリソースを2つのツールで操作するような Agent 12
1つのユースケースなら tool にまとめる © LayerX Inc. リソース指向な API とは違い、tool はユースケースごとに作る
ユースケースとして1つなら、 tool は1つにしたほうが AI からすると使いやすい 13
内部的には usecase 層が存在する(概念的にあるいは実際に) © LayerX Inc. 概念的には複数のドメインにまたがった操作する usecase 層が存在するイメージ 14
Agent を外に置く © LayerX Inc. バックエンドに利用している言語で AI 周りのエコシステムが不十分な場合、Agent 周り を別サービスに分けることも選択肢になる
15
Agent Tool 向けのユースケース指向 API を提供する © LayerX Inc. 「どの処理のかたまりでユースケースを構成するか」は Backend
側で持つほうが自然 かもしれない 16
複数プロダクトにまたがる場合 © LayerX Inc. 複数のプロダクトにまたがるタスク 17
複数プロダクトで1ユースケース © LayerX Inc. プロダクトが1つのときと同じく、ユースケースとして1つなら tool は1つに 18
ユースケースの集約層 - Backend for Agents 的なレイヤ © LayerX Inc. ユースケースを複数の
Agent から利用するケースなどで、集約レイヤを設ける? BFF(Backend for Frontend) に対して、Agent 向けの API 提供層… BFA(Backend for Agents)? 19
設計の分割軸 Tool の粒度:ユースケース単位で作る © LayerX Inc. リソース単位ではなく、ユースケース単位 サービスをまたぐ場合も同様 20
設計の分割軸 Agent の配置:Backend 内か外か © LayerX Inc. Backend 言語の AI
エコシステムの充実度 AI 周りの複雑さ・開発者の分離 21
設計の分割軸 追加レイヤ:BFA(Backend for Agents) © LayerX Inc. 複雑な Agent /
複数 Agent から利用するケース Tool 向け API のレイヤを別途設ける 22
設計は一つに定まらない 設計が1つに定まることはない(多分) © LayerX Inc. LLM / AI Agent は偏在しうる
多様な大きさのタスクで利用される 1つのリソースしか触れないかもしれないし、プロダクトをまたぐかもしれない タスクの規模にフィットした設計を選択していく 23
Agent が偏在する世界の設計 Agent は 特別な一箇所に閉じない © LayerX Inc. 小さな Agent
〜 大きな Agentic workflow どの規模のタスクにも Agent は登場しうる 多様なエンジニアが触る 24
Agent 遍在を前提にした基盤・概念 Tool 定義 Agent に何を 開放するか Durable Execution Human-in-the-loop
を含む 処理の定義 および確実な実行 ... and more 必要なもの、準備していくものはまだまだたくさん! © LayerX Inc. 25