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
Claude Agent SDK を使ってみよう
Search
Hayami Shuhei
October 17, 2025
Programming
2.1k
0
Share
Claude Agent SDK を使ってみよう
Claude Code Meetup Tokyo #1
※スライド中にある自作パッケージは、サードパーティー製ツールにおける利用禁止の方針が明確になったため非公開にしております
Hayami Shuhei
October 17, 2025
More Decks by Hayami Shuhei
See All by Hayami Shuhei
Flutterと Vibe Coding で個人開発!
hyshu
1
380
BLoCパターンとflutter_bloc
hyshu
0
150
Melos x Pub Workspaces で 沢山のアプリとパッケージを管理するのに 苦労した話
hyshu
1
57
Jasprが凄い話
hyshu
1
390
CanvasKitの描画の仕組みを調べてみる
hyshu
0
240
Other Decks in Programming
See All in Programming
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
210
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
140
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
190
GitHub Copilot CLIのいいところ
htkym
2
1k
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
120
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
10
1.3k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
210
Inside Stream API
skrb
1
140
20260514_its_the_context_window_stupid.pdf
heita
0
1.1k
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
110
色即是空、空即是色、データサイエンス
kamoneggi
1
160
inferと仲良くなる10分間
ryokatsuse
1
250
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
700
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
810
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
97
Paper Plane
katiecoart
PRO
1
50k
Navigating Weather and Climate Data
rabernat
0
200
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
180
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Curse of the Amulet
leimatthew05
1
12k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
160
Transcript
Claude Agent SDK Λ ͬͯΈΑ͏ Claude Code Meetup T
okyo #1 aq (Hayami Shuhei) 2025/10/17
ࣗݾհ Claude Code Max͕ग़͙ͯ͢ʹՃೖɺ20xΛ2ͭܖͯͨ࣌͠ظ ccrunnerͱ͍͏؆୯ͳ Claude Code Runner Λ࡞͍ͬͯ·͢
YAMLͰఆٛɺUsage limit ͕དྷͨΒղআ·Ͱࣗಈػ https://github.com/hyshu/ccrunner BR ਫलฏʣϞόΠϧΞϓϦ։ൃऀ
Claude Code SDK ͔Β Claude Agent SDKʹʂ ίʔσΟϯάҎ֎ͷ༻్ߟྀͯ͠ύοέʔδ໊͕มߋ͞Εͨ →AnthropicࣾͰϝϞऔΓಈը࡞ͳͲͰ͍ͬͯΔΒ͍͠
ίʔσΟϯά༻ͷγεςϜϓϩϯϓτҎ֎ઃఆՄೳʹ ΧελϜMCPػೳ͕Ճ͞Εͨ →ϝιουΛMCPαʔόʔΘΓʹઃఆͰ͖ΔͷͰɺπʔϧొ͕؆୯ʹ https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk
import { query } from '@anthropic-ai/claude-code-sdk'; // claude
-p "Hello" ʹ૬ result = query({ prompt: "Hello" }); // allowedTools Ͱૢ࡞ΛڐՄ͢Δ߹ result = query({ prompt: "Hello", options: { allowedTools: [ "Task", "Bash", "Read", "Edit", ….. ], } }); ͜Ε·Ͱ
import { query } from '@anthropic-ai/claude-agent-sdk'; // systemPromptͰγεςϜϓϩϯϓτΛઃఆՄೳʹ //
settingSourcesͰࢀর͢ΔCLAUDE.mdsettings.jsonΛࢦఆ result = query({ prompt: "Hello", options: { systemPrompt: { type: "preset", preset: "claude_code" }, settingSources: ["user", "project", "local"], allowedTools: [ "Task", "Bash", "Read", "Edit", ….. ], } }) ͜Ε͔Β
·ͱΊ Claude Agent SDK ʹͳ͔ͬͯΒࣗ༝͕େ෯ʹ্͕ͬͨ → γεςϜϓϩϯϓτΛม͑Ε௨ৗͷ Claude API
ͷΑ͏ͳ͍ํՄೳʹ ΧελϜMCPͱͯ͠BashίϚϯυΛ࣮ߦɺAPIͷ௨৴ɺଞCLIͷ࣮ߦͳͲͳͲ ccrunnerΛࠓ·ͰʹόʔδϣϯΞοϓ͔ͨͬͨ͠ͷͷɺେ෯ʹ༷ݟ͞ ͳ͍ͱ͍͚ͳͦ͞͏ͳͷͰແཧͰͨ͠(^_^;) →͜͏ͨ͠ํ͕ྑͦ͞͏Έ͍ͨͳΞΠσΞΛืूதͰ͢
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 9!BRIBZBNJ