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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ryu-ki
June 19, 2026
130
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
Transcript
26 slides
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
More Decks by ryu-ki
See All by ryu-ki
自作ハンズオン環境を作ってみた話 〜AMI / code-server 編〜
ryuki0947
0
55
博多ラーメンから考える○○の茹で加減
ryuki0947
0
220
なぜ LT をするのか
ryuki0947
0
100
北海道の地名をAIは読めるのか
ryuki0947
1
190
AgentCore Harness × AgentCore Browser × Live View
ryuki0947
1
200
VPCとも向き合いたい2026(年度)
ryuki0947
0
380
AI-DLCを試してみて困ったことを共有したい
ryuki0947
0
670
Claude Codeに要件をヒアリングしてもらった体験がかなり良かった(2026年版)
ryuki0947
0
620
Qiita 週1投稿を1年間完走した感想
ryuki0947
0
110
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Test your architecture with Archunit
thirion
2
2.5k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
670
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400
The Curse of the Amulet
leimatthew05
4
17k