AWS アカウントが 100 を超える環境では、障害調査のたびにプロファイルの指定やアカウント番号の変換が必要になります。私たちはこの負担を減らすため、アラートの一次調査を行う AI エージェントを内製してきました。
しかし、指示した内容を Wiki に書かないと次回の調査に活かされず、SKILL の修正にも PR、マージ、デプロイが必要でした。さまざまなサービスに展開するには、セルフサービス化が課題でした。
この発表では、エージェントに指示の記憶機能を追加した取り組みをお話しします。
- Slack チャネル、通知、AWS アカウント、サービス、関連リソース、Runbook を結ぶ、JSON によるグラフ風の構造
- DynamoDB、S3 Vectors、S3 を使った Runbook の管理と検索
- 自動で記憶を提案する機能と手動での記憶
- 定期ジョブによる、使われていない記憶の削除、事例の抽象化、システムプロンプト修正の PR 提案
- 開発で苦労した点: 自走させたコーディングエージェントによる要件の削ぎ落としと、単体テストの肥大化、およびそれらへの対応策
---
In an environment with over 100 AWS accounts, every incident investigation means specifying profiles and translating account IDs. To reduce that burden, we have been building an in-house AI agent that handles first-pass alert investigation.
But instructions given to the agent weren't used in the next investigation unless someone wrote them in the wiki, and changing a SKILL required a pull request, merge, and deployment. To roll the agent out to many services, we needed to make it self-service.
This talk covers how we added instruction memory to the agent:
- A graph-like structure in JSON linking Slack channels, notifications, AWS accounts, services, related resources, and runbooks
- Runbook management and search with DynamoDB, S3 Vectors, and S3
- Memory saved manually, or suggested automatically by the agent
- Scheduled jobs that remove unused memories, generalize service-specific cases, and propose system prompt changes as pull requests
- Lessons learned: coding agents running autonomously stripped out requirements, unit tests ballooned, and how we dealt with both