Loading...
Loading...
Coordinate the AWS DevOps Agent across multiple AgentSpaces from one Claude Code session — route questions to the right space (prod vs staging vs knowledge), query several spaces in parallel and synthesize, or compare findings across accounts. Use whenever the user has more than one AgentSpace configured, mentions multiple AWS accounts, or asks something like "check both prod and staging", "compare across accounts", or "ask the knowledge space".
npx skill4agent add aws/agent-toolkit-for-aws coordinating-multi-space-devops-agentaws_devops_agent__list_agent_spacessetup-devops-agentaws_devops_agent__list_agent_spaces()
→ {"agentSpaces": [{"agentSpaceId": "as-abc123", "name": "prod"}, ...]}chatting-with-aws-devops-agentinvestigating-incidents-with-aws-devops-agentagent_space_id| Question shape | Strategy |
|---|---|
| Scoped to one environment ("prod is broken") | Single space — pick the matching one |
| Spans environments ("compare prod vs staging") | Parallel — query each, synthesize |
| Generic knowledge ("what runbooks do we have for ECS?") | Route to the knowledge space if one is named that way |
| Ambiguous ("our service is slow") | Ask the user which environment, don't guess |
.claude/aws-agents-for-devsecops.mdAGENTS.md| Space | AWS Profile | Agent Space ID | Purpose |
|-------|-------------|----------------|---------|
| prod | acme-prod | as-abc123 | Production incidents, customer-facing services |
| stage | acme-stage | as-def456 | Pre-prod validation, integration testing |
| kb | acme-shared | as-ghi789 | Shared runbooks, cross-account knowledge |aws_devops_agent__list_agent_spaces()aws_devops_agent__chat(message="Summarize the AWS accounts, services, and runbooks you have access to.", agent_space_id="<SPACE_ID>").claude/aws-agents-for-devsecops.mdAGENTS.md# 1. Query each space in parallel with environment-specific context
aws_devops_agent__chat(message="<question> | env=prod | <prod IaC context>", agent_space_id="PROD_ID")
→ {"executionId": "...", "answer": "..."}
aws_devops_agent__chat(message="<question> | env=stage | <stage IaC context>", agent_space_id="STAGE_ID")
→ {"executionId": "...", "answer": "..."}
# 2. Synthesize locally — present a side-by-side summary, not two separate dumps# 1. Ask the knowledge space first
aws_devops_agent__chat(
message="What's our standard runbook for ECS 503 errors?",
agent_space_id="KB_ID"
)
→ {"answer": "<runbook text>"}
# 2. Apply that runbook in the target environment
aws_devops_agent__investigate(
title="ECS 503 errors on checkout-service. [Runbook from knowledge space] <runbook text> [Local context] ...",
agent_space_id="PROD_ID",
priority="HIGH"
)title# Pick the matching agentSpaceId from your routing memory, pass it on the call
aws_devops_agent__chat(message="<question>", agent_space_id="<matched_space_id>")aws_devops_agent__investigate(title="Latency spike — prod side", agent_space_id="PROD_ID", priority="HIGH")
aws_devops_agent__investigate(title="Latency spike — stage side", agent_space_id="STAGE_ID", priority="HIGH")taskIddescriptionchatexamples/multi-space-walkthrough.mdsetup-devops-agent