Local Device Support
Local Device Support enables you to use your personal computer (Mac, Linux, or Windows) as a task executor, allowing AI tasks to run directly on your local machine.
π Table of Contentsβ
- Overview
- Device Registration
- Using Local Devices
- Device Management
- Troubleshooting
- Related Resources
π― Overviewβ
What is Local Device Support?β
Local Device Support allows your personal computer to act as a task executor for Wegent. Instead of running AI tasks on cloud infrastructure, tasks are executed directly on your machine with real-time streaming feedback.
Core Benefitsβ
| Benefit | Description |
|---|---|
| Lower Latency | Direct local execution without network transmission delays |
| Data Privacy | Your code and data never leave your local machine |
| Environment Control | Use your locally installed tools, dependencies, and configurations |
| Cost Savings | Reduce cloud execution resource consumption |
| Custom Setup | Access to local credentials, custom tools, and specialized software |
π² Device Registrationβ
Prerequisitesβ
Before registering a local device, ensure you have:
- Wegent account with valid credentials
- Wegent Executor installed on your machine
- Network connectivity to Wegent backend
- Claude Code SDK configured (for ClaudeCode shell type)
Installing Wegent Executorβ
- Clone or download the Wegent Executor package
- Install dependencies:
cd executor
pip install -e .
Starting the Executorβ
Run the executor in local device mode:
# Start with default settings
wegent-executor --mode local --token YOUR_JWT_TOKEN
# Or with environment variables
export WEGENT_TOKEN=your_jwt_token
export WEGENT_BACKEND_URL=https://your-wegent-instance.com
wegent-executor --mode local
Getting JWT Tokenβ
- Log in to Wegent Web UI
- Go to Settings β API Token
- Click Generate to create a new token
- Copy the token for starting the executor
Note: Tokens are valid for 7 days and need to be regenerated after expiration.
π₯ Using Local Devicesβ
Selecting a Deviceβ
In the chat interface, you'll see a device selector dropdown:
- Click the device selector icon near the chat input
- View available devices with their status:
- π’ Online: Device is connected and ready
- π΄ Offline: Device is not connected
- π‘ Busy: Device is running at capacity
- Select your preferred device
- Send your message as usual
Device Status Indicatorsβ
| Status | Icon | Description |
|---|---|---|
| Online | π’ | Device connected, slots available |
| Offline | π΄ | Device not connected |
| Busy | π‘ | All 5 concurrent slots in use |
| Default | β | Your default device for new tasks |
Concurrent Task Slotsβ
Each device supports up to 5 concurrent tasks:
- View slot usage: "2/5 slots in use"
- Device shows "Busy" when all slots are occupied
- Tasks queue if you select a busy device
Switching Between Cloud and Localβ
You can dynamically choose execution location:
| Selection | Behavior |
|---|---|
| Cloud (default) | Task executes on Wegent cloud infrastructure |
| Local Device | Task executes on your selected local machine |
Simply change the device selection before sending each message.
Setting Default Deviceβ
- Open device list in the selector
- Click the star icon next to your preferred device
- This device will be pre-selected for new conversations
βοΈ Device Managementβ
Viewing Registered Devicesβ
Access your devices through:
- Device Selector: Quick access in chat interface
- API:
GET /devicesfor programmatic access
Device Informationβ
Each device shows:
| Field | Description |
|---|---|
| Name | Device hostname (e.g., "Darwin - MacBook-Pro.local") |
| Status | Online/Offline indicator |
| Slots | Concurrent task capacity (X/5) |
| Default | Star indicator if set as default |
Managing Devicesβ
| Action | How To |
|---|---|
| Set Default | Click star icon |
| Remove Default | Click star again on current default |
| Delete Device | Click delete icon |
Note: Deleting a device only removes the registration. If the device reconnects, it will automatically re-register.
Offline Device Handlingβ
When a device goes offline:
- Running tasks are automatically marked as FAILED
- Error message indicates device disconnection
- Task slots are freed immediately
- Device appears grayed out in selector
β Troubleshootingβ
Connection Issuesβ
Device won't connectβ
Possible causes:
- Invalid or expired JWT token
- Network connectivity issues
- Backend URL misconfigured
Solutions:
- Generate a new JWT token from Wegent UI
- Check network connectivity to Wegent backend
- Verify
WEGENT_BACKEND_URLenvironment variable
Device shows offline immediately after connectingβ
Possible causes:
- Token validation failure
- Firewall blocking WebSocket
- Backend service issues
Solutions:
- Check token validity and permissions
- Ensure WebSocket connections are allowed
- Check Wegent backend logs for errors
Task Execution Issuesβ
Tasks fail immediatelyβ
Possible causes:
- Claude Code SDK not installed
- Missing dependencies on local machine
- Insufficient permissions
Solutions:
- Install and configure Claude Code SDK
- Install required dependencies
- Check file system permissions
Tasks hang without progressβ
Possible causes:
- Claude Code SDK stuck
- Network interruption during execution
- Resource exhaustion on local machine
Solutions:
- Restart the executor
- Check network connectivity
- Monitor local resource usage (CPU, memory)
Device Management Issuesβ
Multiple devices with same nameβ
This is normal if you have multiple machines with similar hostnames. Each device has a unique ID based on hardware.
Cannot delete deviceβ
If a device keeps re-appearing after deletion, the executor is still running and re-registering. Stop the executor first, then delete.
π‘ Best Practicesβ
When to Use Local Devicesβ
| Use Case | Recommendation |
|---|---|
| Sensitive codebases | β Local device |
| Quick iterations | β Local device |
| Custom tool requirements | β Local device |
| Batch processing | Cloud (more capacity) |
| Team collaboration | Cloud (shared access) |
| Mobile/remote access | Cloud (no local setup) |
Multi-Device Setupβ
If you have multiple machines:
- Register each device separately
- Use descriptive hostnames for easy identification
- Set your primary workstation as default
- Use cloud fallback when devices are offline
Resource Managementβ
- Monitor local resource usage during task execution
- Close unnecessary applications for better performance
- Consider SSD storage for faster file operations
- Ensure adequate RAM for Claude Code SDK
π Related Resourcesβ
Documentationβ
- Core Concepts - Understand Wegent's architecture
- Managing Tasks - Learn about task execution
Technical Referencesβ
- Local Device Architecture - Technical architecture details
π¬ Get Helpβ
Need assistance?
- π Check FAQ
- π Submit GitHub Issue
- π¬ Join community discussions
Execute AI tasks on your local machine with full control! π