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
Strands Agents × AWS DevOps Agent 〜自作エージェントに組み込...
Search
ryu-ki
June 19, 2026
94
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Strands Agents × AWS DevOps Agent 〜自作エージェントに組み込んでみた〜
ryu-ki
June 19, 2026
More Decks by ryu-ki
See All by ryu-ki
なぜ LT をするのか
ryuki0947
0
65
北海道の地名をAIは読めるのか
ryuki0947
1
170
AgentCore Harness × AgentCore Browser × Live View
ryuki0947
1
130
VPCとも向き合いたい2026(年度)
ryuki0947
0
340
AI-DLCを試してみて困ったことを共有したい
ryuki0947
0
520
Claude Codeに要件をヒアリングしてもらった体験がかなり良かった(2026年版)
ryuki0947
0
520
Qiita 週1投稿を1年間完走した感想
ryuki0947
0
66
AWS × LINE で始める FinOps ~Terraform を添えて~
ryuki0947
0
170
A2A のトレース事情 〜親子エージェントの動きをLangfuseで可視化してみる〜
ryuki0947
1
650
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
650
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Game over? The fight for quality and originality in the time of robots
wayneb77
1
280
Agile that works and the tools we love
rasmusluckow
331
22k
Deep Space Network (abreviated)
tonyrice
0
310
Between Models and Reality
mayunak
4
460
Become a Pro
speakerdeck
PRO
31
6.3k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
How to Talk to Developers About Accessibility
jct
2
550
Transcript
2026/06/19(金) 品川会 #6 Strands Agents × AWS DevOps Agent 〜自作エージェントに組み込んでみた〜
やりたかったこと 2
やりたかったこと DevOps Agent は Web アプリから操作するのが基本 自分のエージェントから呼び出せたら面白いのでは? チャットで環境の状況を聞く – インシデント調査を起票する
– 調査結果を取得する – プレビュー時点では boto3 API が使えなかったが... GA のタイミングで使えるようになった – Strands Agents のカスタムツールとして組み込んでみた – 3
今回作ったもの 4
ツールと構成 3つのツールを作成 ツール 何をする? devops_agent_chat DevOps Agent とチャットする devops_agent_investigate 調査タスクを起票する
devops_agent_get_result 調査結果を取得する Strands Agent ├── devops_agent_chat ← 「このアラーム何が起きてる?」 ├── devops_agent_investigate ← 「調査タスクを起票して」 └── devops_agent_get_result ← 「調査結果を教えて」 5
boto3 での呼び出し方 6
サービス名は devops-agent import boto3 client = boto3.client("devops-agent", region_name="us-east-1") botocore 1.42.79
(GA)以降で利用可能 それ以前だと UnknownServiceError になります – 7
ツール 1:チャット 8
チャットの流れ 1. CreateChat でセッションを作成 2. SendMessage でメッセージを送信 3. EventStream から応答を抽出
9
EventStream のパース type 内容 text ストリーミングテキスト context_usage コンテキスト使用量 final_response 最終応答(これを使う)
chat_title 自動タイトル レスポンスのキーは "events" ブロックの type は以下の 4 種類 10
チャットの実装 @tool def devops_agent_chat(message: str) -> str: chat = devops_client.create_chat(
agentSpaceId=AGENT_SPACE_ID, userType="IAM", ) send_resp = devops_client.send_message( agentSpaceId=AGENT_SPACE_ID, executionId=chat["executionId"], content=message, ) # final_response ブロックだけ抽出 ... 11
ツール 2:調査起票 12
調査起票の実装 @tool def devops_agent_investigate( title: str, description: str, priority: str
= "HIGH" ) -> str: resp = devops_client.create_backlog_task( agentSpaceId=AGENT_SPACE_ID, title=title, description=description, priority=priority, taskType="INVESTIGATION", ) return json.dumps({"taskId": resp["task"]["taskId"], ...}) 起票すると DevOps Agent がバックグラウンドで自律的に調査 13
ツール 3:結果取得 14
結果取得の流れ 1. GetBacklogTask でステータスを確認 2. COMPLETED なら ListJournalRecords で調査ジャーナルを取得 (ステータスは以下のように推移)
3. ジャーナルから最終回答を抽出 PENDING_TRIAGE → PENDING_START → IN_PROGRESS → COMPLETED 抽出のポイント recordType: "message" かつ role: "assistant" が対象 – その中の type: "text" ブロックの最後が最終回答 – 15
デモ 16
チャットの動作 17
Langfuse でトレースを確認 18
調査起票の動作 19
DevOps Agent Web アプリで確認 20
調査結果の取得 21
設計判断 22
起票と結果取得を分離した理由 方式 用途 ポーリング ツール内で結果を待って返したい場合 EventBridge Slack 等への完了通知 分離(今回) エージェントに判断を委ねる
調査完了まで数分〜十数分かかる ポーリングでブロックするのは現実的ではない エージェント自身が「起票→待ち→結果確認」を判断できる 23
まとめ 24
まとめ といったことを Claude Code が調査してくれて楽に実装できたが... こういった試行錯誤が楽しかった時期もあったなぁとしみじみしました DevOps Agent を boto3
経由で Strands のツールとして組み込んだ チャット・調査起票・結果取得の 3 つのツールを実装 EventStream のパースが少し複雑 キーは "events" 、取得すべきは final_response のみ – 起票と結果取得の分離がポイント 25
ご清聴ありがとうございました 26