Basic Operations
List and Explore Agents
Scenario: Discover what agents are available in your infrastructure.1
Ask Claude to list agents
“What agents do I have?”Claude reads the
agents://list resource and displays all agents with their descriptions.2
Get details about a specific agent
“Tell me more about the DevOps agent”Claude calls the
get_agent tool to fetch detailed configuration.3
Check agent capabilities
“What skills does the DevOps agent have?”Claude analyzes the agent’s skill configuration from the detailed response.
Execute an Agent
Scenario: Run an agent to perform a task.1
Execute with a simple prompt
“Run the DevOps agent to check Kubernetes cluster health”Claude:
- Reads
agents://listto find “DevOps Agent” → ID:agent-abc123 - Calls
execute_agentwith the prompt - Returns execution ID
2
Monitor execution progress
“Show me the progress”Claude calls
stream_execution_to_completion to monitor real-time updates.3
View final results
Claude displays the execution summary and agent’s response.
You: Run the DevOps agent to check our production Kubernetes cluster healthClaude: I’ll execute the DevOps agent for you.Execution started (ID: exec-12345)Progress updates:
- [00:01] Agent started
- [00:03] Running: kubectl get nodes
- [00:05] Running: kubectl get pods —all-namespaces
- [00:08] Running: kubectl top nodes
- [00:10] Analysis complete
- 5 nodes: All ready
- 127 pods: 125 running, 2 pending (scheduled)
- Resource usage: CPU 45%, Memory 62%
- No critical alerts
Infrastructure Management
Create a New Environment
Scenario: Set up a new deployment environment.“Create a new environment called ‘qa-testing’ for our QA team with tags ‘testing’ and ‘automation’”Claude’s Actions:
- Calls
create_environmenttool - Confirms creation with ID and details
Configure an Agent for Multiple Environments
Scenario: Update an existing agent to work in multiple environments.“Update the DevOps agent to also work in the qa-testing environment”Claude’s Actions:
- Reads
agents://listto find DevOps agent ID - Reads
environments://listto find qa-testing environment ID - Calls
update_agentwith updated environment_ids array
Monitoring and Execution Tracking
Monitor a Long-Running Execution
Scenario: Execute an agent and track progress in real-time.1
Start execution
“Execute the Infrastructure agent to provision a new database cluster in staging”Claude calls
execute_agent and receives execution ID.2
Stream progress
Claude automatically calls
stream_execution_to_completion to monitor.3
Show real-time updates
Claude displays events as they occur:
- Tool started/completed events
- Status changes
- Progress messages
Execution Started (ID: exec-78901)Real-time updates:Execution Summary:
- Duration: 3 minutes 44 seconds
- Tools executed: 3
- Status: COMPLETED
- Result: Database cluster successfully provisioned in staging environment
- RDS Instance: db-staging-001
- Endpoint: db-staging-001.abc123.us-east-1.rds.amazonaws.com:5432
- Status: available
Check Execution History
Scenario: Review recent agent executions.“Show me the last 10 executions for the DevOps agent”Claude’s Actions:
- Reads
agents://listto find DevOps agent ID - Calls
list_executionswith filters:entity_id=agent-abc123, limit=10 - Formats results
Job Management
Create a Scheduled Job
Scenario: Set up a daily backup job.“Create a daily job that runs the Backup agent at 2 AM UTC to backup all production databases”Claude’s Actions:
- Reads
agents://listto find Backup agent ID - Calls
create_jobwith cron schedule
Trigger a Job Manually
Scenario: Run a scheduled job immediately for testing.“Trigger the daily backup job now”Claude’s Actions:
- Reads
jobs://listto find the job - Calls
trigger_jobwith job ID
Team Workflows
Execute a Team-Based Workflow
Scenario: Use a team of agents for a complex task.“Execute the Infrastructure Team to set up a complete staging environment with database, cache, and load balancer”Claude’s Actions:
- Reads
teams://listto find Infrastructure Team - Calls
execute_teamwith detailed prompt - Streams execution with multiple team member updates
Team Execution Started
- Team: Infrastructure Team (team-infra-001)
- Members: 3 agents
- Execution ID: exec-team-456
- [00:15] Provisioning RDS instance
- [02:30] Database ready: db-staging.aws.com:5432
- [00:20] Creating ElastiCache cluster
- [01:45] Cache ready: cache-staging.aws.com:6379
- [00:25] Configuring Application Load Balancer
- [01:30] Health checks configured
- [02:00] Load balancer active: lb-staging.aws.com
- [02:35] All components ready
- [02:40] Running integration tests
- [03:15] Tests passed
- Duration: 3 minutes 15 seconds
- Status: COMPLETED
- Result: Staging environment fully configured
- Database: PostgreSQL 14 (db-staging.aws.com:5432)
- Cache: Redis 7.0 (cache-staging.aws.com:6379)
- Load Balancer: ALB (lb-staging.aws.com)
- Health: All services healthy
Advanced Patterns
Conditional Execution Based on Resource State
Scenario: Only execute if specific conditions are met.“Check if there are any pending deployments in production. If yes, show me the details and ask if I want to approve them”Claude’s Actions:
- Calls
execute_agentwith DevOps agent - Analyzes results
- Conditionally asks for user input
Batch Operations
Scenario: Perform the same operation on multiple resources.“Create worker queues for all environments”Claude’s Actions:
- Reads
environments://listresource - Loops through each environment
- Calls
create_worker_queuefor each
Error Handling and Recovery
Scenario: Handle failures gracefully and suggest recovery steps.“Execute the Deployment agent to deploy v3.0.0 to production”If execution fails:
Execution Failed (exec-error-789)Error Details:
- Tool: kubectl_apply
- Error: ImagePullBackOff
- Message: Failed to pull image: registry.company.com/app:v3.0.0
- Reason: Image not found in registry
- Verify the image was built and pushed:
- Check the registry:
- Build and push if missing:
- Check the build logs?
- List available image versions?
- Roll back to the previous version?
Integration Patterns
CI/CD Integration
Scenario: Integrate with CI/CD pipeline. GitHub Actions Example:Monitoring Dashboard
Scenario: Build a monitoring view using read-only access.“Show me a status dashboard: How many agents, active executions, and worker queue health”Claude’s Actions:
- Reads multiple resources in parallel:
agents://listworker-queues://list
- Calls
list_executionswith status filter - Calls
health_check
Best Practices from Examples
Use descriptive prompts
Use descriptive prompts
Good: “Execute the DevOps agent to check production Kubernetes cluster health”Better: “Execute the DevOps agent to check production Kubernetes cluster health, focusing on node status, pod health, and resource usage”More context leads to better results.
Leverage resources for context
Leverage resources for context
You don’t need to know IDs - Claude uses resources automatically:Good: “Execute agent agent-abc123”Better: “Execute the DevOps agent”Claude reads resources to find the right ID.
Monitor long-running operations
Monitor long-running operations
For operations that take time, Claude automatically uses streaming:Ask: “Deploy and monitor the progress”Claude will show real-time updates.
Handle errors gracefully
Handle errors gracefully
When operations fail, ask Claude for help:“The deployment failed. What went wrong and how do I fix it?”Claude can analyze error messages and suggest solutions.