aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(observability): LLM-assisted trace analysis for failed tasks

Offen
#458 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
agent-runtime enhancement observability
Vorherrschende Sprache
TypeScript
Sterne
143
Forks
46
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
24

Beschreibung

**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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit ROADMAP.md sowie docs/design/OBSERVABILITY.md und docs/design/EVALUATION.md und verfolge anschließend den bestehenden --trace-Ablauf und den Ereignispfad für task_failed. Prüfe den vorgeschlagenen Einstiegspunkt bgagent trace analyze und definiere, wie Trace-Daten, Bedrock-Analyse, persistierte Artefakte, Ratenbegrenzungen und optionale Aggregation zusammenpassen. Als abgeschlossen gilt die Aufgabe, wenn Umfang und Design des Features für die Implementierung geklärt sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, typescript
Bereich
backend-api-design, cloud, observability
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.