diff --git a/aws-devops-agent/POWER.md b/aws-devops-agent/POWER.md index 586f2f0..00f256d 100644 --- a/aws-devops-agent/POWER.md +++ b/aws-devops-agent/POWER.md @@ -172,7 +172,8 @@ Start with chat for instant answers. Escalate to investigation only when the pro 4. If complex root cause needed: aws___call_aws("aws devops-agent create-backlog-task ...") → escalate to deep research (5-8 min) Poll get-backlog-task + list-journal-records → stream progress - list-recommendations → get-recommendation → generate remediation code + aws___call_aws("aws devops-agent update-backlog-task --task-status PENDING_START ...") → trigger mitigation (2-5 min) + Poll get-backlog-task until COMPLETED again. Then call list-executions to find the newest execution_id, and list-journal-records --execution-id EXEC_ID --record-type mitigation_summary_md to get the mitigation plan ``` --- @@ -230,7 +231,9 @@ For incidents requiring deep root cause analysis: 2. aws___call_aws(cli_command="aws devops-agent create-backlog-task --agent-space-id SPACE_ID --task-type INVESTIGATION --title 'Describe the issue' --priority HIGH --description 'Include local context here' --region us-east-1") → taskId + executionId 3. Poll every 30-45s: aws___call_aws(cli_command="aws devops-agent get-backlog-task --agent-space-id SPACE_ID --task-id TASK_ID --region us-east-1") until status changes from PENDING_START to IN_PROGRESS 4. Stream every 30-45s: aws___call_aws(cli_command="aws devops-agent list-journal-records --agent-space-id SPACE_ID --execution-id EXEC_ID --region us-east-1") -5. Once COMPLETED: aws___call_aws(cli_command="aws devops-agent list-recommendations --agent-space-id SPACE_ID --task-id TASK_ID --region us-east-1") → get-recommendation → generate remediation code +5. Once COMPLETED: trigger mitigation (2-5 min): aws___call_aws(cli_command="aws devops-agent update-backlog-task --agent-space-id SPACE_ID --task-id TASK_ID --task-status PENDING_START --region us-east-1") +6. Poll get-backlog-task every 30-45s until COMPLETED again, then: aws___call_aws(cli_command="aws devops-agent list-executions --agent-space-id SPACE_ID --task-id TASK_ID --region us-east-1") → find newest execution_id +7. Retrieve mitigation: aws___call_aws(cli_command="aws devops-agent list-journal-records --agent-space-id SPACE_ID --execution-id EXEC_ID --record-type mitigation_summary_md --region us-east-1") ``` **Stream progress to the user** — don't silently poll: @@ -330,7 +333,7 @@ You: 5. If deeper root cause needed: aws___call_aws("aws devops-agent create-backlog-task --agent-space-id SPACE_ID --task-type INVESTIGATION --title 'ECS 503 errors on ' --priority HIGH --description '' --region us-east-1") Poll get-backlog-task + list-journal-records → stream progress with emojis - On complete: list-recommendations → get-recommendation → show fix + On complete: update-backlog-task --task-status PENDING_START → trigger mitigation (2-5 min) → poll until COMPLETED → list-executions to find newest execution_id → list-journal-records --execution-id EXEC_ID --record-type mitigation_summary_md 6. If recommendation has IaC: generate the fix code locally ``` diff --git a/aws-devops-agent/steering/steering.md b/aws-devops-agent/steering/steering.md index 5ec616e..36a9248 100644 --- a/aws-devops-agent/steering/steering.md +++ b/aws-devops-agent/steering/steering.md @@ -39,7 +39,9 @@ Best for: cost optimization, architecture review, topology mapping, knowledge di 2. aws___call_aws(cli_command="aws devops-agent create-backlog-task --agent-space-id SPACE_ID --task-type INVESTIGATION --title '...' --priority HIGH --description '...' --region us-east-1") → taskId + executionId 3. Poll every 30-45s: aws___call_aws(cli_command="aws devops-agent get-backlog-task --agent-space-id SPACE_ID --task-id TASK_ID --region us-east-1") until status=IN_PROGRESS 4. Stream: aws___call_aws(cli_command="aws devops-agent list-journal-records --agent-space-id SPACE_ID --execution-id EXEC_ID --region us-east-1") every 30-45s while IN_PROGRESS -5. Once COMPLETED: aws___call_aws(cli_command="aws devops-agent list-recommendations --agent-space-id SPACE_ID --task-id TASK_ID --region us-east-1") → get-recommendation → generate remediation code +5. Once COMPLETED: trigger mitigation (2-5 min): aws___call_aws(cli_command="aws devops-agent update-backlog-task --agent-space-id SPACE_ID --task-id TASK_ID --task-status PENDING_START --region us-east-1") +6. Poll get-backlog-task every 30-45s until COMPLETED again, then: aws___call_aws(cli_command="aws devops-agent list-executions --agent-space-id SPACE_ID --task-id TASK_ID --region us-east-1") → find newest execution_id +7. Retrieve mitigation: aws___call_aws(cli_command="aws devops-agent list-journal-records --agent-space-id SPACE_ID --execution-id EXEC_ID --record-type mitigation_summary_md --region us-east-1") ``` ## Context Injection @@ -51,7 +53,7 @@ Best for: cost optimization, architecture review, topology mapping, knowledge di - ❌ Do NOT use `aws___call_aws` for `SendMessage` — it returns an EventStream that `call_aws` cannot handle. Use `aws___run_script` instead - ❌ Do NOT ask "should I investigate or chat?" — auto-route based on keywords - ❌ Do NOT forget `--task-type INVESTIGATION` when creating backlog tasks (required) -- ❌ Do NOT call `list-recommendations` before investigation status=COMPLETED (empty results) +- ❌ Do NOT call `list-recommendations` expecting mitigation plans — mitigation plans require triggering first (`update-backlog-task --task-status PENDING_START`), then appear as `mitigation_summary_md` in journal records. `list-recommendations` only returns proactive recommendations from the Evaluation Agent - ❌ Do NOT pass ARNs as `userId` — use simple usernames matching `^[a-zA-Z0-9_.-]+$` - ❌ Do NOT poll faster than every 30 seconds (wastes API quota) - ❌ Do NOT silently poll investigations — stream journal findings to user with emoji progress