machinaos 0.0.10 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.env.template +16 -0
  2. package/client/package.json +1 -1
  3. package/client/src/Dashboard.tsx +3 -3
  4. package/client/src/components/AIAgentNode.tsx +24 -12
  5. package/client/src/components/OutputPanel.tsx +3 -2
  6. package/client/src/components/parameterPanel/InputSection.tsx +16 -3
  7. package/client/src/nodeDefinitions/aiAgentNodes.ts +12 -0
  8. package/client/src/nodeDefinitions/specializedAgentNodes.ts +68 -320
  9. package/client/src/nodeDefinitions/toolNodes.ts +87 -1
  10. package/client/src/nodeDefinitions/workflowNodes.ts +55 -1
  11. package/package.json +12 -3
  12. package/scripts/daemon.js +427 -0
  13. package/scripts/start.js +7 -1
  14. package/scripts/sync-version.js +108 -0
  15. package/server/Dockerfile +6 -7
  16. package/server/constants.py +2 -0
  17. package/server/core/cleanup.py +123 -0
  18. package/server/core/config.py +16 -0
  19. package/server/core/database.py +92 -1
  20. package/server/core/health.py +121 -0
  21. package/server/examples/__init__.py +1 -0
  22. package/server/gunicorn.conf.py +46 -0
  23. package/server/main.py +38 -3
  24. package/server/models/database.py +1 -0
  25. package/server/models/nodes.py +18 -2
  26. package/server/requirements-docker.txt +86 -0
  27. package/server/routers/database.py +16 -0
  28. package/server/routers/websocket.py +6 -5
  29. package/server/services/ai.py +115 -14
  30. package/server/services/auth.py +6 -1
  31. package/server/services/deployment/manager.py +14 -0
  32. package/server/services/event_waiter.py +55 -0
  33. package/server/services/example_loader.py +60 -0
  34. package/server/services/execution/executor.py +2 -0
  35. package/server/services/execution/models.py +8 -0
  36. package/server/services/handlers/__init__.py +2 -0
  37. package/server/services/handlers/ai.py +164 -11
  38. package/server/services/handlers/document.py +13 -4
  39. package/server/services/handlers/tools.py +445 -14
  40. package/server/services/node_executor.py +3 -0
  41. package/server/services/temporal/activities.py +3 -0
  42. package/server/services/workflow.py +2 -0
  43. package/server/skills/android_agent/app-launcher-skill/SKILL.md +137 -0
  44. package/server/skills/android_agent/app-list-skill/SKILL.md +148 -0
  45. package/server/skills/android_agent/audio-skill/SKILL.md +169 -0
  46. package/server/skills/android_agent/battery-skill/SKILL.md +114 -0
  47. package/server/skills/android_agent/bluetooth-skill/SKILL.md +151 -0
  48. package/server/skills/android_agent/camera-skill/SKILL.md +148 -0
  49. package/server/skills/android_agent/environmental-skill/SKILL.md +140 -0
  50. package/server/skills/android_agent/location-skill/SKILL.md +163 -0
  51. package/server/skills/android_agent/motion-skill/SKILL.md +141 -0
  52. package/server/skills/android_agent/screen-control-skill/SKILL.md +164 -0
  53. package/server/skills/android_agent/wifi-skill/SKILL.md +182 -0
  54. package/server/skills/assistant/subagent-skill/SKILL.md +205 -0
  55. package/server/skills/coding_agent/javascript-skill/SKILL.md +196 -0
  56. package/server/skills/coding_agent/python-skill/SKILL.md +165 -0
  57. package/server/skills/social_agent/whatsapp-db-skill/SKILL.md +284 -0
  58. package/server/skills/social_agent/whatsapp-send-skill/SKILL.md +180 -0
  59. package/server/skills/task_agent/cron-scheduler-skill/SKILL.md +215 -0
  60. package/server/skills/task_agent/task-manager-skill/SKILL.md +251 -0
  61. package/server/skills/task_agent/timer-skill/SKILL.md +168 -0
  62. package/server/skills/travel_agent/geocoding-skill/SKILL.md +186 -0
  63. package/server/skills/travel_agent/nearby-places-skill/SKILL.md +234 -0
  64. package/server/skills/web_agent/http-request-skill/SKILL.md +211 -0
  65. package/server/skills/android/skill/SKILL.md +0 -84
  66. package/server/skills/assistant/code-skill/SKILL.md +0 -176
  67. package/server/skills/assistant/http-skill/SKILL.md +0 -163
  68. package/server/skills/assistant/maps-skill/SKILL.md +0 -172
  69. package/server/skills/assistant/scheduler-skill/SKILL.md +0 -86
  70. package/server/skills/assistant/whatsapp-skill/SKILL.md +0 -285
  71. /package/server/skills/{android → android_agent}/personality/SKILL.md +0 -0
  72. /package/server/skills/{assistant → web_agent}/web-search-skill/SKILL.md +0 -0
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: screen-control-skill
3
+ description: Control Android screen - brightness, wake screen, auto-brightness toggle, and screen timeout settings.
4
+ allowed-tools: screen_control_automation
5
+ metadata:
6
+ author: machina
7
+ version: "1.0"
8
+ category: android
9
+ icon: "💡"
10
+ color: "#EAB308"
11
+ ---
12
+
13
+ # Screen Control Tool
14
+
15
+ Control screen settings on Android device.
16
+
17
+ ## How It Works
18
+
19
+ This skill provides instructions for the **Screen Control Automation** tool node. Connect the **Screen Control Automation** node to Zeenie's `input-tools` handle to enable screen control.
20
+
21
+ ## screen_control Tool
22
+
23
+ Control screen brightness and display settings.
24
+
25
+ ### Schema Fields
26
+
27
+ | Field | Type | Required | Description |
28
+ |-------|------|----------|-------------|
29
+ | action | string | Yes | Action to perform (see below) |
30
+ | parameters | object | No | Additional parameters for set actions |
31
+
32
+ ### Actions
33
+
34
+ | Action | Description |
35
+ |--------|-------------|
36
+ | `status` | Get current screen settings |
37
+ | `set_brightness` | Set screen brightness level |
38
+ | `wake` | Wake the screen |
39
+ | `auto_brightness_on` | Enable auto-brightness |
40
+ | `auto_brightness_off` | Disable auto-brightness |
41
+
42
+ ### Examples
43
+
44
+ **Get screen status:**
45
+ ```json
46
+ {
47
+ "action": "status"
48
+ }
49
+ ```
50
+
51
+ **Set brightness to 50%:**
52
+ ```json
53
+ {
54
+ "action": "set_brightness",
55
+ "parameters": {
56
+ "level": 50
57
+ }
58
+ }
59
+ ```
60
+
61
+ **Wake the screen:**
62
+ ```json
63
+ {
64
+ "action": "wake"
65
+ }
66
+ ```
67
+
68
+ **Enable auto-brightness:**
69
+ ```json
70
+ {
71
+ "action": "auto_brightness_on"
72
+ }
73
+ ```
74
+
75
+ **Disable auto-brightness:**
76
+ ```json
77
+ {
78
+ "action": "auto_brightness_off"
79
+ }
80
+ ```
81
+
82
+ ### Response Formats
83
+
84
+ **Status response:**
85
+ ```json
86
+ {
87
+ "success": true,
88
+ "service": "screen_control",
89
+ "action": "status",
90
+ "data": {
91
+ "brightness": 75,
92
+ "auto_brightness": true,
93
+ "screen_on": true,
94
+ "screen_timeout": 30000
95
+ }
96
+ }
97
+ ```
98
+
99
+ **Set brightness response:**
100
+ ```json
101
+ {
102
+ "success": true,
103
+ "service": "screen_control",
104
+ "action": "set_brightness",
105
+ "data": {
106
+ "previous_brightness": 100,
107
+ "new_brightness": 50
108
+ }
109
+ }
110
+ ```
111
+
112
+ ### Response Fields
113
+
114
+ | Field | Type | Description |
115
+ |-------|------|-------------|
116
+ | brightness | int | Current brightness (0-100) |
117
+ | auto_brightness | boolean | Auto-brightness enabled |
118
+ | screen_on | boolean | Screen is currently on |
119
+ | screen_timeout | int | Timeout in milliseconds |
120
+
121
+ ## Use Cases
122
+
123
+ | Use Case | Action | Description |
124
+ |----------|--------|-------------|
125
+ | Check display | status | Get current settings |
126
+ | Lower brightness | set_brightness | Reduce for battery/eyes |
127
+ | Wake device | wake | Turn on screen |
128
+ | Enable adaptive | auto_brightness_on | Let system adjust |
129
+ | Fixed brightness | auto_brightness_off | Manual control |
130
+
131
+ ## Common Workflows
132
+
133
+ ### Battery saving
134
+
135
+ 1. Disable auto-brightness
136
+ 2. Set brightness to 30%
137
+ 3. Reduce screen timeout
138
+
139
+ ### Night mode
140
+
141
+ 1. Disable auto-brightness
142
+ 2. Set brightness to 10-20%
143
+ 3. Enable blue light filter (if available)
144
+
145
+ ### Presentation mode
146
+
147
+ 1. Disable auto-brightness
148
+ 2. Set brightness to 100%
149
+ 3. Increase screen timeout
150
+
151
+ ## Brightness Guidelines
152
+
153
+ | Level | Use Case |
154
+ |-------|----------|
155
+ | 0-20% | Night/dark room |
156
+ | 20-50% | Indoor use |
157
+ | 50-80% | Normal use |
158
+ | 80-100% | Bright conditions/outdoor |
159
+
160
+ ## Setup Requirements
161
+
162
+ 1. Connect the **Screen Control Automation** node to Zeenie's `input-tools` handle
163
+ 2. Android device must be paired
164
+ 3. System settings permission may be required
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: wifi-skill
3
+ description: Control Android WiFi - enable, disable, get status, scan for networks, and get current connection info.
4
+ allowed-tools: wifi_automation
5
+ metadata:
6
+ author: machina
7
+ version: "1.0"
8
+ category: android
9
+ icon: "📶"
10
+ color: "#3B82F6"
11
+ ---
12
+
13
+ # WiFi Automation Tool
14
+
15
+ Control WiFi on Android devices.
16
+
17
+ ## How It Works
18
+
19
+ This skill provides instructions for the **WiFi Automation** tool node. Connect the **WiFi Automation** node to Zeenie's `input-tools` handle to enable WiFi control.
20
+
21
+ ## wifi_automation Tool
22
+
23
+ Control WiFi settings and get network information.
24
+
25
+ ### Schema Fields
26
+
27
+ | Field | Type | Required | Description |
28
+ |-------|------|----------|-------------|
29
+ | action | string | Yes | Action to perform (see below) |
30
+ | parameters | object | No | Additional parameters for certain actions |
31
+
32
+ ### Actions
33
+
34
+ | Action | Description | Parameters |
35
+ |--------|-------------|------------|
36
+ | `status` | Get WiFi status and connection info | None |
37
+ | `enable` | Turn WiFi on | None |
38
+ | `disable` | Turn WiFi off | None |
39
+ | `scan` | Scan for available networks | None |
40
+
41
+ ### Examples
42
+
43
+ **Get WiFi status:**
44
+ ```json
45
+ {
46
+ "action": "status"
47
+ }
48
+ ```
49
+
50
+ **Enable WiFi:**
51
+ ```json
52
+ {
53
+ "action": "enable"
54
+ }
55
+ ```
56
+
57
+ **Disable WiFi:**
58
+ ```json
59
+ {
60
+ "action": "disable"
61
+ }
62
+ ```
63
+
64
+ **Scan for networks:**
65
+ ```json
66
+ {
67
+ "action": "scan"
68
+ }
69
+ ```
70
+
71
+ ### Response Formats
72
+
73
+ **Status response:**
74
+ ```json
75
+ {
76
+ "success": true,
77
+ "service": "wifi_automation",
78
+ "action": "status",
79
+ "data": {
80
+ "enabled": true,
81
+ "connected": true,
82
+ "ssid": "MyHomeNetwork",
83
+ "bssid": "aa:bb:cc:dd:ee:ff",
84
+ "ip_address": "192.168.1.100",
85
+ "link_speed": 72,
86
+ "rssi": -45,
87
+ "frequency": 2437
88
+ }
89
+ }
90
+ ```
91
+
92
+ **Scan response:**
93
+ ```json
94
+ {
95
+ "success": true,
96
+ "service": "wifi_automation",
97
+ "action": "scan",
98
+ "data": {
99
+ "networks": [
100
+ {
101
+ "ssid": "MyHomeNetwork",
102
+ "bssid": "aa:bb:cc:dd:ee:ff",
103
+ "rssi": -45,
104
+ "frequency": 2437,
105
+ "security": "WPA2"
106
+ },
107
+ {
108
+ "ssid": "Neighbor_WiFi",
109
+ "bssid": "11:22:33:44:55:66",
110
+ "rssi": -70,
111
+ "frequency": 5180,
112
+ "security": "WPA3"
113
+ }
114
+ ]
115
+ }
116
+ }
117
+ ```
118
+
119
+ **Enable/Disable response:**
120
+ ```json
121
+ {
122
+ "success": true,
123
+ "service": "wifi_automation",
124
+ "action": "enable",
125
+ "data": {
126
+ "message": "WiFi enabled successfully"
127
+ }
128
+ }
129
+ ```
130
+
131
+ ### Response Fields
132
+
133
+ | Field | Description |
134
+ |-------|-------------|
135
+ | enabled | WiFi radio is on |
136
+ | connected | Connected to a network |
137
+ | ssid | Network name |
138
+ | bssid | Access point MAC address |
139
+ | ip_address | Device IP on network |
140
+ | link_speed | Connection speed in Mbps |
141
+ | rssi | Signal strength (dBm, closer to 0 is stronger) |
142
+ | frequency | Channel frequency in MHz |
143
+
144
+ ## Use Cases
145
+
146
+ | Use Case | Action | Description |
147
+ |----------|--------|-------------|
148
+ | Check connection | status | Verify WiFi is connected |
149
+ | Toggle WiFi | enable/disable | Control WiFi radio |
150
+ | Find networks | scan | List available networks |
151
+ | Signal strength | status | Check connection quality |
152
+
153
+ ## Common Workflows
154
+
155
+ ### Auto-connect workflow
156
+
157
+ 1. Check WiFi status
158
+ 2. If not enabled, enable it
159
+ 3. Scan for networks
160
+ 4. Report available options
161
+
162
+ ### Battery saving
163
+
164
+ 1. Check if on mobile data
165
+ 2. If not using WiFi, disable it
166
+ 3. Re-enable when needed
167
+
168
+ ## Signal Strength Guide
169
+
170
+ | RSSI (dBm) | Quality |
171
+ |------------|---------|
172
+ | > -50 | Excellent |
173
+ | -50 to -60 | Good |
174
+ | -60 to -70 | Fair |
175
+ | -70 to -80 | Weak |
176
+ | < -80 | Poor |
177
+
178
+ ## Setup Requirements
179
+
180
+ 1. Connect the **WiFi Automation** node to Zeenie's `input-tools` handle
181
+ 2. Android device must be paired
182
+ 3. Location permission may be required for scanning
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: subagent-skill
3
+ description: Manage sub-agent delegation, handle task completion events, and coordinate multi-agent workflows.
4
+ metadata:
5
+ author: machina
6
+ version: "2.0"
7
+ category: assistant
8
+ icon: "🤖"
9
+ color: "#8B5CF6"
10
+ ---
11
+
12
+ # Sub-Agent Management Skill
13
+
14
+ You are a parent agent that can delegate tasks to specialized sub-agents. This skill helps you understand, delegate to, and handle results from sub-agents effectively.
15
+
16
+ ## CRITICAL: Always Check Sub-Agents First
17
+
18
+ **NEVER say "I don't have that tool" or "I can't do that" without first checking your connected sub-agents.**
19
+
20
+ When a user requests something you don't have a direct tool for:
21
+
22
+ 1. **Check your connected sub-agents** - Look at what agents are available in your tools
23
+ 2. **Delegate to the appropriate sub-agent** - They have their own tools and capabilities
24
+ 3. **Only say you can't** if NO sub-agent can handle it
25
+
26
+ **Wrong approach:**
27
+ ```
28
+ User: "Check my phone battery"
29
+ You: "I don't have access to Android tools, so I can't check your battery."
30
+ ```
31
+
32
+ **Correct approach:**
33
+ ```
34
+ User: "Check my phone battery"
35
+ You: [Check if Android Control Agent is connected]
36
+ You: [Delegate to Android Control Agent: "Get battery status"]
37
+ You: "Let me check that for you..." [waits for result]
38
+ ```
39
+
40
+ ## Available Sub-Agent Types
41
+
42
+ You can delegate tasks to these specialized agents (when connected to your tools):
43
+
44
+ ### Domain-Specific Agents
45
+
46
+ | Agent | Icon | Specialty | Best For |
47
+ |-------|------|-----------|----------|
48
+ | **Android Control Agent** | 📱 | Android device automation | Battery checks, WiFi control, app launching, location tracking, sensor data |
49
+ | **Coding Agent** | 💻 | Code execution | Python/JavaScript execution, calculations, data processing |
50
+ | **Web Control Agent** | 🌐 | Browser automation | Web scraping, HTTP requests, form filling |
51
+ | **Social Media Agent** | 📱 | Social messaging | WhatsApp, Telegram, multi-platform messaging |
52
+ | **Travel Agent** | ✈️ | Travel planning | Itineraries, location lookups, travel recommendations |
53
+
54
+ ### Task & Workflow Agents
55
+
56
+ | Agent | Icon | Specialty | Best For |
57
+ |-------|------|-----------|----------|
58
+ | **Task Management Agent** | 📋 | Task automation | Scheduling, reminders, to-do management |
59
+ | **Tool Agent** | 🔧 | Tool orchestration | Multi-tool workflows, complex task execution |
60
+ | **Productivity Agent** | ⏰ | Productivity | Time management, note-taking, workflow automation |
61
+
62
+ ### Business Agents
63
+
64
+ | Agent | Icon | Specialty | Best For |
65
+ |-------|------|-----------|----------|
66
+ | **Payments Agent** | 💳 | Payment processing | Payment workflows, invoices, financial operations |
67
+ | **Consumer Agent** | 🛒 | Consumer support | Customer service, product recommendations, order management |
68
+
69
+ ## How to Check Sub-Agent Capabilities
70
+
71
+ Before responding "I can't do that":
72
+
73
+ 1. **List your available tools** - Sub-agents appear as delegation tools
74
+ 2. **Match the request to an agent specialty** - Use the table above
75
+ 3. **Delegate if a match exists** - The sub-agent has its own tools
76
+ 4. **Only decline if truly impossible** - No matching agent connected
77
+
78
+ ### Capability Matching Examples
79
+
80
+ | User Request | Check For | Delegate To |
81
+ |--------------|-----------|-------------|
82
+ | "Check my battery" | Android Control Agent | `delegate_to_android_agent` |
83
+ | "Send a WhatsApp" | Social Media Agent | `delegate_to_social_agent` |
84
+ | "Calculate this" | Coding Agent | `delegate_to_coding_agent` |
85
+ | "Find restaurants nearby" | Travel Agent | `delegate_to_travel_agent` |
86
+ | "Make an HTTP request" | Web Control Agent | `delegate_to_web_agent` |
87
+ | "Set a reminder" | Task Management Agent | `delegate_to_task_agent` |
88
+
89
+ ## How Delegation Works
90
+
91
+ ### Fire-and-Forget Pattern
92
+ When you delegate a task:
93
+ 1. The sub-agent receives the task and starts working immediately
94
+ 2. You continue your conversation - delegation is non-blocking
95
+ 3. The sub-agent works independently with its own tools and memory
96
+ 4. When complete, a `task_completed` event is fired
97
+
98
+ ### What You Receive Back
99
+ - **Task ID**: Unique identifier (e.g., `delegated_abc123_xyz`)
100
+ - **Status**: `completed` or `error`
101
+ - **Agent Name**: Which sub-agent completed the work
102
+ - **Result/Error**: The outcome or error message
103
+
104
+ ## Delegation Best Practices
105
+
106
+ ### When to Delegate
107
+ - User requests something outside your direct tools
108
+ - Task requires specialized capabilities (Android, WhatsApp, code execution, etc.)
109
+ - Task is time-consuming and can run in background
110
+ - Task matches a sub-agent's specialty area
111
+
112
+ ### When NOT to Delegate
113
+ - Simple questions you can answer directly from knowledge
114
+ - Tasks that need immediate response AND you have the direct tool
115
+ - When the same task is already running (avoid duplicates)
116
+
117
+ ### Delegation Format
118
+ When delegating, provide clear instructions:
119
+ ```
120
+ Task: [Clear description of what needs to be done]
121
+ Context: [Any relevant background information]
122
+ Expected Output: [What format/information you need back]
123
+ ```
124
+
125
+ ## Handling Task Completion
126
+
127
+ ### Successful Completion
128
+ When a delegated task completes successfully:
129
+
130
+ 1. **DO NOT delegate again** - The task is finished
131
+ 2. **Extract key information** from the result
132
+ 3. **Report to the user** naturally and conversationally
133
+ 4. **Suggest next steps** if appropriate
134
+
135
+ **Example Response:**
136
+ "The Android agent has checked your battery status. Your device is at 78% with approximately 5 hours of usage remaining. Would you like me to enable power-saving mode?"
137
+
138
+ ### Failed Tasks
139
+ When a delegated task fails:
140
+
141
+ 1. **DO NOT retry automatically** - Let the user decide
142
+ 2. **Explain what went wrong** clearly
143
+ 3. **Suggest alternatives** or troubleshooting steps
144
+
145
+ **Example Response:**
146
+ "I wasn't able to send the WhatsApp message because the contact wasn't found. Could you verify the phone number? Alternatively, I can try searching for the contact by name."
147
+
148
+ ## Multi-Agent Coordination
149
+
150
+ ### Sequential Delegation
151
+ For tasks requiring multiple steps:
152
+ 1. Delegate first task to appropriate agent
153
+ 2. Wait for completion via task trigger
154
+ 3. Use result to delegate next task
155
+ 4. Continue until workflow complete
156
+
157
+ ### Parallel Delegation
158
+ For independent tasks:
159
+ - Delegate multiple tasks to different agents
160
+ - Each runs independently
161
+ - Collect results as they complete
162
+
163
+ ## Critical Rules
164
+
165
+ 1. **ALWAYS check sub-agents before saying "I can't"** - They extend your capabilities
166
+ 2. **NEVER re-delegate after receiving a result** - Report it instead
167
+ 3. **NEVER retry failed tasks automatically** - Ask user first
168
+ 4. **ALWAYS acknowledge task completion** to the user
169
+ 5. **ALWAYS match task to agent specialty** for best results
170
+
171
+ ## Error Handling
172
+
173
+ | Error Type | Action |
174
+ |------------|--------|
175
+ | Agent not connected | Inform user which agent is needed and how to connect it |
176
+ | Task timeout | Report to user, suggest retry |
177
+ | Invalid parameters | Clarify requirements with user |
178
+ | Agent error | Report error details, suggest alternatives |
179
+
180
+ ## Example Workflows
181
+
182
+ ### Battery Check Workflow
183
+ ```
184
+ User: "Check my phone battery"
185
+ You: [See Android Control Agent in tools]
186
+ You: Delegate to Android Control Agent with task "Get battery status"
187
+ Agent: Returns {status: 'completed', result: 'Battery at 78%, charging'}
188
+ You: "Your phone battery is at 78% and currently charging."
189
+ ```
190
+
191
+ ### Message Sending Workflow
192
+ ```
193
+ User: "Send a WhatsApp to John saying I'll be late"
194
+ You: [See Social Media Agent in tools]
195
+ You: Delegate to Social Media Agent with message details
196
+ Agent: Returns {status: 'completed', result: 'Message sent to John'}
197
+ You: "Done! I've sent the message to John letting him know you'll be late."
198
+ ```
199
+
200
+ ### No Agent Available
201
+ ```
202
+ User: "Check my phone battery"
203
+ You: [No Android Control Agent in tools]
204
+ You: "I don't have an Android Control Agent connected right now. To check your battery, please connect an Android Control Agent to my tools input, then ask again."
205
+ ```