aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(observability): LLM-assisted trace analysis for failed tasks
- 主要言語
- TypeScript
- スター
- 143
- フォーク
- 46
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 24
説明
**Context:** ROADMAP.md → Agent quality → LLM-assisted trace analysis
**Related:** `--trace` (shipped), automated alert triage draft
---
## Component
API or orchestration
## Describe the feature
Automated **post-mortem** deep dive on failed task trajectories (S3 trace NDJSON + OpenTelemetry spans + `TaskEvents`) using an LLM to surface recurring reasoning and tool-use failure modes. Distinct from mid-run `bgagent ask` and optional status summarization.
## Use case
Operators debugging failure clusters spend hours reading traces. Platform teams need pattern detection across failures (e.g. repeated `git push` auth errors, hallucinated file paths).
## Proposed solution
1. Trigger on `task_failed` (optional Blueprint flag or operator-initiated `bgagent trace analyze`).
2. Lambda loads trace + events; calls Bedrock with structured output schema.
3. Persist analysis artifact (S3 + `TaskEvents` `trace_analysis` event).
4. Rate limits and cost caps per analysis.
5. Optional aggregation job for cross-task themes (weekly operator report).
## Other information
- Distinct from **automated alert triage** (security/ops alarms, not task post-mortems).
- Design context: `docs/design/OBSERVABILITY.md`, `docs/design/EVALUATION.md`.
- [ ] This might be a breaking change
コントリビューションガイド
調査の方向性
ROADMAP.md、docs/design/OBSERVABILITY.md、docs/design/EVALUATION.mdから始め、既存の--traceフローとtask_failedイベントの経路を追跡します。提案されているbgagent trace analyzeエントリポイントを確認し、traceデータ、Bedrock分析、永続化されたアーティファクト、レート制限、オプションの集約をどのように組み合わせるかを定義します。実装に向けて機能のスコープと設計が解決されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, typescript
- 領域
- backend-api-design, cloud, observability
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100