aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(observability): LLM-assisted trace analysis for failed tasks
- Lenguaje dominante
- TypeScript
- Estrellas
- 143
- Forks
- 46
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 24
Descripción
**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
Guía de contribución
Línea de trabajo
Comienza con ROADMAP.md, docs/design/OBSERVABILITY.md y docs/design/EVALUATION.md, y luego sigue el flujo existente de --trace y la ruta del evento task_failed. Revisa el punto de entrada propuesto bgagent trace analyze y define cómo encajan los datos de trace, el análisis de Bedrock, los artefactos persistidos, los límites de tasa y la agregación opcional. Se considera terminado cuando el alcance y el diseño de la funcionalidad estén resueltos para la implementación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- aws, typescript
- Área
- backend-api-design, cloud, observability
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100