when-deploying-cloud-swarm-use-flow-nexus-swarm
Deploy cloud-based AI agent swarms with event-driven workflow automation using Flow Nexus platform. Supports hierarchical, mesh, ring, and star topologies with E2B sandbox distribution.
What this skill does
# Flow Nexus Cloud Swarm Deployment SOP
```yaml
metadata:
skill_name: when-deploying-cloud-swarm-use-flow-nexus-swarm
version: 1.0.0
category: platform-integration
difficulty: advanced
estimated_duration: 40-70 minutes
trigger_patterns:
- "deploy cloud swarm"
- "flow nexus swarm"
- "distributed workflow"
- "event-driven agents"
- "cloud agent coordination"
dependencies:
- flow-nexus MCP server
- Claude Flow hooks
- E2B account (optional)
agents:
- hierarchical-coordinator (swarm orchestrator)
- flow-nexus-swarm (cloud platform manager)
- adaptive-coordinator (dynamic optimization)
success_criteria:
- Swarm initialized successfully
- Agents deployed to cloud
- Workflows executing correctly
- Performance metrics tracked
- Auto-scaling functional
```
## Overview
Deploy cloud-based AI agent swarms with event-driven workflow automation using Flow Nexus platform. Supports hierarchical, mesh, ring, and star topologies with E2B sandbox distribution.
## Prerequisites
**Required:**
- Flow Nexus MCP server installed
- Flow Nexus account (authenticated)
- Basic understanding of swarm patterns
**Optional:**
- E2B API key for cloud sandboxes
- Anthropic API key for Claude Code
- Existing workflow definitions
**Verification:**
```bash
# Check Flow Nexus availability
npx flow-nexus@latest --version
# Verify authentication
mcp__flow-nexus__auth_status
```
## Agent Responsibilities
### hierarchical-coordinator (Swarm Orchestrator)
**Role:** Coordinate multi-level swarm hierarchy, manage agent lifecycles, optimize task distribution
**Expertise:**
- Hierarchical swarm patterns
- Task decomposition
- Agent coordination
- Resource allocation
**Output:** Swarm topology, agent assignments, coordination protocols
### flow-nexus-swarm (Cloud Platform Manager)
**Role:** Manage Flow Nexus platform integration, E2B sandbox deployment, cloud resources
**Expertise:**
- Flow Nexus platform APIs
- E2B sandbox management
- Cloud infrastructure
- Distributed systems
**Output:** Cloud deployment, sandbox configuration, resource management
### adaptive-coordinator (Dynamic Optimization)
**Role:** Monitor swarm performance, adapt topology, optimize resource usage dynamically
**Expertise:**
- Performance monitoring
- Dynamic optimization
- Resource management
- Adaptive algorithms
**Output:** Performance metrics, optimization recommendations, scaling policies
## Phase 1: Initialize Cloud Swarm
**Objective:** Initialize swarm with selected topology and agent configuration
**Evidence-Based Validation:**
- Swarm created successfully
- Topology configured correctly
- Swarm ID stored in memory
- Configuration validated
**hierarchical-coordinator Actions:**
```bash
# Pre-task coordination
npx claude-flow@alpha hooks pre-task --description "Initialize cloud swarm deployment"
# Restore session
npx claude-flow@alpha hooks session-restore --session-id "cloud-swarm-$(date +%s)"
# Create project structure
mkdir -p swarm/{config,agents,workflows,monitoring,docs}
# Design swarm topology
cat > swarm/config/topology.json << 'EOF'
{
"topology": "hierarchical",
"maxAgents": 8,
"strategy": "adaptive",
"roles": {
"coordinator": {
"count": 1,
"capabilities": ["task_delegation", "monitoring", "optimization"]
},
"supervisor": {
"count": 2,
"capabilities": ["team_management", "task_execution", "reporting"]
},
"worker": {
"count": 5,
"capabilities": ["task_execution", "specialization"]
}
},
"communication": {
"protocol": "event-driven",
"queue": "message-queue",
"realtime": true
}
}
EOF
# Post-edit hook
npx claude-flow@alpha hooks post-edit --file "swarm/config/topology.json" --memory-key "swarm/topology"
```
**flow-nexus-swarm Actions:**
```bash
# Initialize swarm on Flow Nexus platform
mcp__flow-nexus__swarm_init {
"topology": "hierarchical",
"maxAgents": 8,
"strategy": "adaptive"
}
# Store swarm ID
SWARM_ID="[returned_swarm_id]"
npx claude-flow@alpha memory store --key "swarm/swarm-id" --value "$SWARM_ID"
# Get swarm status
mcp__flow-nexus__swarm_status { "swarm_id": "$SWARM_ID" }
# List available swarm templates
mcp__flow-nexus__swarm_templates_list {
"category": "specialized",
"includeStore": true
}
# Store swarm configuration
npx claude-flow@alpha memory store \
--key "swarm/config" \
--value "{\"swarm_id\": \"$SWARM_ID\", \"topology\": \"hierarchical\", \"max_agents\": 8, \"timestamp\": \"$(date -Iseconds)\"}"
# Notify initialization complete
npx claude-flow@alpha hooks notify --message "Cloud swarm initialized: $SWARM_ID"
```
**adaptive-coordinator Actions:**
```bash
# Create performance monitoring configuration
cat > swarm/monitoring/config.json << 'EOF'
{
"metrics": {
"swarm": ["agent_count", "task_throughput", "response_time"],
"agents": ["utilization", "success_rate", "error_rate"],
"resources": ["cpu_usage", "memory_usage", "network_io"]
},
"thresholds": {
"high_utilization": 0.85,
"low_utilization": 0.2,
"max_response_time_ms": 5000,
"max_error_rate": 0.05
},
"scaling": {
"scale_up": {
"trigger": "utilization > 0.85 for 5 minutes",
"action": "add 2 agents"
},
"scale_down": {
"trigger": "utilization < 0.2 for 10 minutes",
"action": "remove 1 agent"
}
}
}
EOF
# Post-edit hook
npx claude-flow@alpha hooks post-edit --file "swarm/monitoring/config.json" --memory-key "swarm/monitoring-config"
```
**Success Criteria:**
- [ ] Swarm initialized on Flow Nexus
- [ ] Topology configured
- [ ] Monitoring setup created
- [ ] Configuration stored
**Memory Persistence:**
```bash
npx claude-flow@alpha memory store \
--key "swarm/phase1-complete" \
--value "{\"status\": \"complete\", \"swarm_id\": \"$SWARM_ID\", \"topology\": \"hierarchical\", \"timestamp\": \"$(date -Iseconds)\"}"
```
## Phase 2: Deploy Agents to Cloud
**Objective:** Deploy specialized agents to E2B sandboxes with role-specific configurations
**Evidence-Based Validation:**
- All agents deployed successfully
- Sandboxes running
- Agent capabilities configured
- Communication established
**hierarchical-coordinator Actions:**
```bash
# Define agent specifications
cat > swarm/agents/specifications.json << 'EOF'
{
"coordinator": {
"type": "coordinator",
"capabilities": ["task_delegation", "monitoring", "optimization"],
"resources": {
"template": "nodejs",
"memory": "2GB",
"cpus": 2
}
},
"supervisors": [
{
"type": "supervisor",
"name": "supervisor-backend",
"capabilities": ["backend_tasks", "database", "api"],
"specialization": "backend"
},
{
"type": "supervisor",
"name": "supervisor-frontend",
"capabilities": ["frontend_tasks", "ui", "testing"],
"specialization": "frontend"
}
],
"workers": [
{
"type": "worker",
"name": "worker-coder-1",
"capabilities": ["coding", "implementation"],
"specialization": "coder"
},
{
"type": "worker",
"name": "worker-coder-2",
"capabilities": ["coding", "implementation"],
"specialization": "coder"
},
{
"type": "worker",
"name": "worker-tester",
"capabilities": ["testing", "validation"],
"specialization": "tester"
},
{
"type": "worker",
"name": "worker-reviewer",
"capabilities": ["code_review", "quality"],
"specialization": "reviewer"
},
{
"type": "worker",
"name": "worker-docs",
"capabilities": ["documentation", "writing"],
"specialization": "documentation"
}
]
}
EOF
# Post-edit hook
npx claude-flow@alpha hooks post-edit --file "swarm/agents/specifications.json" --memory-key "swarm/agent-specs"
```
**flow-nexus-swarm Actions:**
```bash
# Retrieve swarm ID
SWARM_ID=$(npx claude-flow@alpha memory retrieve --key "swarm/swarm-id" | jq -r '.value')
# Spawn cooRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.