Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

Operator Zero

Build an Autonomous Amazon Bedrock Agent that Operates Itself

AWS Community Day Philippines 2026
Hands-on workshop by Tutorials Dojo

License: MITAWS RegionCDK


What This Is

This is the take-home repository from the Operator Zero workshop. You built an autonomous multi-agent system on AWS that:

  1. Detects a CloudWatch alarm firing on your ECS infrastructure
  2. Classifies the incident using a Diagnostics Agent (Claude 3.5 Sonnet)
  3. Heals the infrastructure by restarting the ECS service via a Remediation Agent
  4. Verifies the fix worked by checking service health
  5. Records the full incident report to DynamoDB — autonomously, with no human input

The agents do steps 2 through 5 themselves after you trigger step 1.


Architecture

CloudWatch Alarm (ECS CPU > 60%)
↓ state change → ALARM
EventBridge Rule (operator-zero-alarm-router)
↓ invokes automatically
Lambda: operator-zero-dispatcher
↓ starts agent session
SUPERVISOR HARNESS (operator_zero_supervisor)
Claude 3.5 Sonnet
CLASSIFY → RECALL → REASON → DECIDE
↓ delegates to ↓ delegates to
DIAGNOSTICS HARNESS REMEDIATION HARNESS
Queries DynamoDB history Restarts ECS service
Returns root cause + Verifies recovery
confidence score Returns outcome
↓ ↓
Back to Supervisor ←────────────────┘
↓
Writes full incident report to DynamoDB
(what happened, what was fixed, outcome)
↓
ECS service recovers → CloudWatch alarm returns to OK

What You Built

ComponentAWS ServicePurpose
Supervisor HarnessAmazon Bedrock AgentCoreOrchestrates the full incident lifecycle
Diagnostics HarnessAmazon Bedrock AgentCoreRoot cause analysis and confidence scoring
Remediation HarnessAmazon Bedrock AgentCoreAutonomous ECS healing and verification
Incident MemoryAmazon DynamoDB90-day persistent incident history
Event PipelineAmazon EventBridgeRoutes alarm events automatically
Entry PointAWS Lambda (dispatcher)Receives events, starts agent sessions
ToolsAWS Lambda (action-handler)Handles all agent tool calls
Monitored WorkloadAmazon ECS Fargatenginx service being monitored
InfrastructureAWS CDK v2 TypeScriptAll of the above as code

Repository Structure

operator-zero-workshop/
├── cdk/ Infrastructure as code (CDK v2 TypeScript)
│ ├── bin/operator-zero.ts CDK app entry point
│ ├── lib/base-infra-stack.ts All AWS resources defined here
│ ├── package.json
│ └── tsconfig.json
├── lambda/
│ ├── dispatcher/handler.py EventBridge → Bedrock AgentCore entry point
│ ├── action-handler/handler.py All agent tool implementations
│ └── chaos-trigger/handler.py Safe incident simulator
├── prompts/
│ ├── supervisor-system-prompt.txt Paste into Supervisor Harness
│ ├── diagnostics-system-prompt.txt Paste into Diagnostics Harness
│ └── remediation-system-prompt.txt Paste into Remediation Harness
├── architecture/
│ └── architecture.txt Full architecture diagram
├── scripts/
│ ├── deploy.sh One-command infrastructure deploy
│ └── update_dispatcher.sh Wire your Harness ID into the dispatcher Lambda
└── README.md

Prerequisites

Before deploying, confirm you have:

  • AWS account with AdministratorAccess
  • AWS CLI v2 installed and configured
  • Node.js 20+ installed
  • AWS CDK v2 installed globally: npm install -g aws-cdk
  • AWS CloudShell access (or local terminal with AWS credentials)
  • Amazon Bedrock AgentCore access in ap-southeast-1

Quick Start — Redeploy in Any Account

# 1. Clone this repo
git clone https://github.com/Tutorials-Dojo/operator-zero-workshop.git
cd operator-zero-workshop
# 2. Deploy base infrastructure (8–12 minutes)
bash scripts/deploy.sh
# 3. Create three AgentCore Harnesses in the AWS Console# Following the steps below# 4. Wire your Supervisor Harness ID into the dispatcher Lambda
bash scripts/update_dispatcher.sh

Step-by-Step: Create the AgentCore Harnesses

After bash scripts/deploy.sh completes, create three Harnesses in the AWS Console. All steps are in ap-southeast-1 (Singapore).

Navigate to AgentCore

  1. AWS Console → search Amazon Bedrock → click it
  2. In the left sidebar under Build, click AgentCore ↗
  3. In the AgentCore sidebar under Build, click Harness

Harness 1 — Supervisor (the orchestrator)

  1. Click Quick create Harness → name: operator_zero_supervisorCreate
  2. Click on the new Harness → Edit
  3. Model: Claude 3.5 Sonnet
  4. System prompt: paste full contents of prompts/supervisor-system-prompt.txt
  5. SaveDeploy
  6. Copy the Harness ARN — you need it in the next step

Harness 2 — Diagnostics (root cause specialist)

  1. Quick create Harness → name: operator_zero_diagnosticsCreate
  2. Model: Claude 3.5 Sonnet
  3. System prompt: paste full contents of prompts/diagnostics-system-prompt.txt
  4. Add tool: query_incident_history → Lambda: operator-zero-action-handler
  5. SaveDeploy
  6. Copy the Harness ARN

Harness 3 — Remediation (autonomous healer)

  1. Quick create Harness → name: operator_zero_remediationCreate
  2. Model: Claude 3.5 Sonnet
  3. System prompt: paste full contents of prompts/remediation-system-prompt.txt
  4. Add tools:
    • restart_ecs_service → Lambda: operator-zero-action-handler
    • verify_ecs_service_health → Lambda: operator-zero-action-handler
  5. SaveDeploy
  6. Copy the Harness ARN

Wire the Dispatcher

# Set your Harness ARNsexport SUPERVISOR_HARNESS_ARN=arn:aws:bedrock-agentcore:ap-southeast-1:ACCOUNT:harness/...
export DIAGNOSTICS_HARNESS_ARN=arn:aws:bedrock-agentcore:ap-southeast-1:ACCOUNT:harness/...
export REMEDIATION_HARNESS_ARN=arn:aws:bedrock-agentcore:ap-southeast-1:ACCOUNT:harness/...
bash scripts/update_dispatcher.sh

Trigger the Autonomous Pipeline

# 1. Enable EventBridge
aws events enable-rule \
--name operator-zero-alarm-router \
--region ap-southeast-1
# 2. Trigger a simulated incident
aws cloudwatch set-alarm-state \
--alarm-name operator-zero-ECSHighCPU \
--state-value ALARM \
--state-reason "CPU at 91% — autonomous test" \
--region ap-southeast-1
# 3. Watch the outcome in DynamoDB (refresh every 30 seconds)
aws dynamodb scan \
--table-name operator-zero-incidents \
--region ap-southeast-1 \
--query 'Items[*].{Type:incident_type.S,Action:action_taken.S,Outcome:outcome.S,Time:timestamp.S}' \
--output table
# 4. Disable EventBridge when done
aws events disable-rule \
--name operator-zero-alarm-router \
--region ap-southeast-1

See the Three Outputs

Output A — Harness Playground (live streaming)

  • AgentCore → Harness → operator_zero_supervisor → Test in playground
  • Watch the agents reason in real time

Output B — CloudWatch Logs (execution trace)

  • CloudWatch → Log groups → /aws/lambda/operator-zero-dispatcher
  • CloudWatch → Log groups → /aws/lambda/operator-zero-action-handler

Output C — DynamoDB (persistent incident report)

  • DynamoDB → Tables → operator-zero-incidents → Explore table items
  • See: action_taken: REMEDIATED, outcome: RESOLVED

What to Build Next

ExtensionWhat it adds
GuardDuty event sourceSecurity findings trigger the autonomous pipeline
AWS Config event sourceCompliance violations trigger diagnosis and alerting
Bedrock GuardrailsBound what the Remediation Agent is allowed to do
Knowledge BaseAgents search your runbooks before reasoning
Cost Sentinel HarnessSpecialist agent for cost anomaly incidents
Bedrock MemoryReplace DynamoDB with native AgentCore Memory

See the full Operator Zero lab on Tutorials Dojo PlayCloud for the complete guided experience.


Cost to Keep Running

ServiceIdle costPer invocation
ECS Fargate~$0.40/day
Lambda$0Negligible
DynamoDB$0 (on-demand)Negligible
Bedrock (Claude 3.5 Sonnet)$0~$0.01–$0.05
CloudWatch~$0

Destroy when done:

cd cdk
cdk destroy OperatorZeroBaseStack --force

Also delete your three Harnesses in the AgentCore console.


Workshop Details

EventAWS Community Day Philippines 2026
WorkshopBuild an Autonomous Amazon Bedrock Agent that Operates Itself
LevelIntermediate to Advanced
Duration90 minutes
Regionap-southeast-1 (Singapore)
ModelClaude 3.5 Sonnet via Amazon Bedrock AgentCore
IaCAWS CDK v2 (TypeScript)
ByTutorials Dojo

License

MIT License — see LICENSE

© 2026 Tutorials Dojo

About

AWS Community Day Philippines 2026 — Build an Autonomous Amazon Bedrock Agent that Operates Itself

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages