🌐 CLI Instance Routing
Route Fiberwisecommands to local, default server, or remote instances with seamless configuration management
Overview
The Fiberwise CLI supports instance routing via the --to-instance
parameter, allowing you to run agents on different Fiberwise instances. By default, agents run on your local machine instance for fastest performance.
• Local Instance:
--to-instance local
(CLI default) - Your local machine• Default Instance:
--to-instance default
- Your configured default server• Named Instance:
--to-instance "name"
- Specific configured server
Available Instances
🏠 Local Instance (Default)
Your local machine - Agents run directly on your development machine for fastest performance.
- ✅ Fastest performance (optimized execution)
- ✅ Full functionality available
- ✅ No network dependencies
- ✅ No configuration required
- 🗄️ Uses local database and storage
🌐 Default Server Instance
Your configured default Fiberwise server. Could be local development server, staging, production, or self-hosted remote.
- 🌐 Runs on configured server
- 🔑 Requires API authentication
- 📋 Uses configuration set via
fiber account add-config --set-default
- 🚀 Flexible: can point to any environment
🌍 Named Server Instance
A specific named Fiberwise server instance. Use this to target specific environments like staging, production, or team servers.
- 🌐 Runs on named server
- 🔐 Requires API authentication
- ⚡ Network-dependent performance
- 📊 Uses specific server configuration
Supported Commands
Command | Local Support | Remote Support | Status |
---|---|---|---|
fiber activate |
✅ Direct execution | ✅ API routing | Fully Implemented |
fiber account list-providers |
✅ Database query | ✅ API endpoint | Fully Implemented |
fiber functions list |
✅ Database query | 🚧 Framework ready | API Pending |
fiber functions execute |
✅ Direct execution | 🚧 Framework ready | API Pending |
fiber functions list-agents |
✅ Database query | 🚧 Framework ready | API Pending |
fiber functions activate-multi |
✅ Coordination engine | 🚧 Framework ready | API Pending |
Configuration Setup
Example Configurations
Default Configuration (~/.fiberwise/configs/default.json)
Remote Configuration Example (~/.fiberwise/configs/production.json)
Setup Commands
Basic Setup (Most Common)
Advanced Setup (Multiple Environments)
Usage Examples
Agent Activation
Provider Management
Function Management
Multi-Agent Coordination
Troubleshooting
🔒 Authentication Issues
Solution: Verify your API key in the configuration file and ensure it has the correct permissions.
🌐 Connection Issues
Solution: Ensure the target server is running and accessible. Check network connectivity and base URL.
⚙️ Configuration Issues
Solution: Add the required configuration using fiber account add-config
.
🐛 Debug Mode
Use --verbose
for detailed execution information:
API Authentication
api_
prefix. The CLI automatically handles this formatting.
Architecture Benefits
🔄 Development Workflow
- Local Development: Use
--to-instance local
to run on your machine (fastest) - Server Testing: Use
--to-instance default
to run on your development server - Production Deployment: Use
--to-instance "production"
to run on production servers
🔧 Code Sharing
The instance routing system uses the fiberwise-sdk for maximum code reuse:
- LocalClient for direct database access
- RestClient for API calls
- Consistent interface across all routing modes
📈 Scalability
- Local Instance: Your development machine - fastest for iteration
- Default Instance: Your default server - testing and integration
- Named Instances: Production clusters, cloud deployments, team collaboration
🔮 Future Enhancements
- Auto-discovery of execution context
- Load balancing across instances
- Intelligent response caching
- Batch operations
- Connection pooling
Quick Reference
Command Pattern | Local Direct | Local Server | Remote Instance |
---|---|---|---|
Parameter | --to-instance local |
--to-instance default |
--to-instance "prod" |
Performance | Fastest ⚡ | Fast 🚀 | Network-dependent 🌐 |
Use Case | Local Development | Default Server | Named Server |
Authentication | None Required | API Key Required | API Key Required |
Configuration | None Required | Default config file | Named config file |