8.4 KiB
Flow Nexus Integration Guide
Overview
Agentic Flow now integrates with Flow Nexus, a cloud platform for AI development, adding 96 additional MCP tools for cloud sandboxes, distributed swarms, neural training, and more.
Total MCP Tools: 203
| Server | Tools | Description |
|---|---|---|
| claude-flow | 101 | Core orchestration, memory, GitHub, neural networks |
| flow-nexus | 96 | Cloud sandboxes, distributed swarms, workflows, challenges |
| claude-flow-sdk | 6 | In-process memory and coordination tools |
| TOTAL | 203 | Complete AI orchestration toolkit |
Flow Nexus Features
☁️ Cloud Sandboxes (E2B)
Create isolated execution environments for code development and testing:
sandbox_create- Create Node.js, Python, React, or Next.js sandboxessandbox_execute- Run code in isolated environmentsandbox_upload- Upload files to sandboxsandbox_status- Check sandbox healthsandbox_logs- View execution logssandbox_delete- Clean up resources
🤖 Distributed Swarms
Deploy multi-agent swarms in the cloud with auto-scaling:
swarm_init- Initialize cloud swarm with topologyswarm_scale- Scale agents up or downagent_spawn- Create specialized agentstask_orchestrate- Distribute tasks across agentsswarm_status- Monitor swarm health
🧠 Distributed Neural Training
Train neural networks across multiple cloud sandboxes:
neural_train- Train models with distributed computeneural_predict- Run inference on trained modelsneural_cluster_init- Initialize training clusterneural_node_deploy- Deploy training nodesneural_training_status- Monitor training progress
⚡ Workflow Automation
Event-driven workflow orchestration with message queues:
workflow_create- Define automated workflowsworkflow_execute- Run workflows asynchronouslyworkflow_status- Check workflow progressworkflow_queue_status- Monitor message queues
🎯 Challenges & Gamification
Coding challenges with leaderboards and achievements:
challenges_list- Browse available challengeschallenge_submit- Submit solution for validationleaderboard_get- View rankingsachievements_list- Track user achievements
💰 Credit Management
Pay-as-you-go pricing with auto-refill:
check_balance- View current credit balancecreate_payment_link- Generate payment linkconfigure_auto_refill- Set up automatic refillsget_payment_history- View transaction history
📦 Templates & App Store
Pre-built project templates and marketplace:
template_list- Browse available templatestemplate_deploy- Deploy template to sandboxapp_search- Search marketplace appsapp_get- Get application details
Authentication
Flow Nexus requires authentication to access cloud features.
Register New Account
# Using CLI
npx agentic-flow --agent flow-nexus-auth \
--task "Register account with email: user@example.com, password: secure123"
# Or via MCP tool directly
mcp__flow-nexus__user_register({
email: "user@example.com",
password: "secure123",
full_name: "Your Name"
})
Login to Existing Account
# Using CLI
npx agentic-flow --agent flow-nexus-auth \
--task "Login with email: user@example.com, password: secure123"
# Or via MCP tool directly
mcp__flow-nexus__user_login({
email: "user@example.com",
password: "secure123"
})
Check Authentication Status
npx agentic-flow --agent flow-nexus-user-tools \
--task "Check my authentication status and profile"
Usage Examples
Create and Execute in Sandbox
npx agentic-flow --agent flow-nexus-sandbox \
--task "Create a Node.js sandbox named 'api-dev', execute 'console.log(process.version)', and show the output"
Deploy Distributed Swarm
npx agentic-flow --agent flow-nexus-swarm \
--task "Initialize a mesh topology swarm with 5 agents, then orchestrate building a REST API with authentication"
Train Neural Network
npx agentic-flow --agent flow-nexus-neural \
--task "Train a classification neural network using distributed training across 3 nodes"
Create Workflow
npx agentic-flow --agent flow-nexus-workflow \
--task "Create an event-driven workflow that triggers on git push, runs tests, and deploys on success"
Check Credits
npx agentic-flow --agent flow-nexus-payments \
--task "Check my current credit balance and payment history"
Validation Results
Local Validation ✅
node validation/test-flow-nexus.js user@example.com password123
Results:
- ✅ 203 total MCP tools discovered
- 101 from claude-flow
- 96 from flow-nexus
- 6 from claude-flow-sdk
- ✅ Authentication successful
- Login working
- Session persistence
- User profile accessible
- ✅ System health verified
- Database: Healthy
- Version: 2.0.0
- All services operational
- ⚠️ Sandbox creation (requires 10 credits minimum)
Docker Validation ✅
docker build -t agentic-flow:flow-nexus .
docker run --rm -e ANTHROPIC_API_KEY=sk-ant-... agentic-flow:flow-nexus --help
Results:
- ✅ Docker image builds successfully (~5 minutes)
- ✅ All three MCP servers initialized in container
- ✅ CLI functional with Flow Nexus integration
- ✅ 75 agents loaded including flow-nexus specialists
Pricing
Flow Nexus uses a credit-based system:
| Resource | Cost (Credits) |
|---|---|
| Sandbox (hourly) | 10 credits |
| Swarm agent (hourly) | 5 credits |
| Neural training (job) | 20-100 credits |
| Workflow execution | 1-5 credits |
Credit Packages:
- Starter: $10 = 100 credits
- Developer: $50 = 550 credits (10% bonus)
- Professional: $200 = 2400 credits (20% bonus)
Auto-refill Available:
- Set threshold (e.g., 20 credits)
- Automatic recharge when balance drops
- Configurable refill amount
Architecture
Triple MCP Server Setup
// src/agents/claudeAgent.ts
mcpServers: {
// 1. In-SDK Server (6 tools, in-process)
'claude-flow-sdk': claudeFlowSdkServer,
// 2. Claude Flow (101 tools, subprocess)
'claude-flow': {
command: 'npx',
args: ['claude-flow@alpha', 'mcp', 'start']
},
// 3. Flow Nexus (96 tools, subprocess)
'flow-nexus': {
command: 'npx',
args: ['flow-nexus@latest', 'mcp', 'start']
}
}
Agent Coordination
Flow Nexus agents automatically coordinate with claude-flow for:
- Memory sharing - Store sandbox IDs and workflow results
- Swarm coordination - Combine local and cloud agents
- Task orchestration - Distribute work across environments
- Performance monitoring - Track resource usage
Troubleshooting
Authentication Issues
Problem: Login fails with "Invalid credentials"
Solution:
- Verify email/password are correct
- Check if account is registered:
mcp__flow-nexus__user_register - Reset password if needed:
mcp__flow-nexus__user_reset_password
Insufficient Credits
Problem: "Insufficient credits to create sandbox"
Solution:
- Check balance:
mcp__flow-nexus__check_balance - Create payment link:
mcp__flow-nexus__create_payment_link({ amount: 10 }) - Enable auto-refill:
mcp__flow-nexus__configure_auto_refill({ enabled: true, threshold: 20, amount: 100 })
MCP Server Connection
Problem: Flow Nexus tools not appearing
Solution:
- Verify installation:
npm ls flow-nexus - Check MCP server status in logs
- Restart with:
npx flow-nexus@latest mcp start
Docker Environment
Problem: Flow Nexus not working in Docker
Solution:
- Ensure
ANTHROPIC_API_KEYis set - Verify network connectivity for MCP subprocesses
- Check logs:
docker logs <container_id>
Security Notes
⚠️ Important Security Practices:
- Never hardcode credentials in source code or Docker images
- Use environment variables for sensitive data
- Rotate API keys regularly for production deployments
- Enable 2FA on Flow Nexus account for production use
- Use separate accounts for development vs production
Support
- Flow Nexus Docs: https://github.com/ruvnet/flow-nexus
- Agentic Flow Issues: https://github.com/ruvnet/agentic-flow/issues
- MCP Protocol: https://modelcontextprotocol.io
- Claude Agent SDK: https://docs.claude.com/en/api/agent-sdk
Ready to build with cloud-powered AI agents? 🚀