machinaos 0.0.1

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 (288) hide show
  1. package/.env.template +71 -0
  2. package/LICENSE +21 -0
  3. package/README.md +87 -0
  4. package/bin/cli.js +159 -0
  5. package/client/.dockerignore +45 -0
  6. package/client/Dockerfile +68 -0
  7. package/client/eslint.config.js +29 -0
  8. package/client/index.html +13 -0
  9. package/client/nginx.conf +66 -0
  10. package/client/package.json +48 -0
  11. package/client/src/App.tsx +27 -0
  12. package/client/src/Dashboard.tsx +1173 -0
  13. package/client/src/ParameterPanel.tsx +301 -0
  14. package/client/src/components/AIAgentNode.tsx +321 -0
  15. package/client/src/components/APIKeyValidator.tsx +118 -0
  16. package/client/src/components/ClaudeChatModelNode.tsx +18 -0
  17. package/client/src/components/ConditionalEdge.tsx +189 -0
  18. package/client/src/components/CredentialsModal.tsx +306 -0
  19. package/client/src/components/EdgeConditionEditor.tsx +443 -0
  20. package/client/src/components/GeminiChatModelNode.tsx +18 -0
  21. package/client/src/components/GenericNode.tsx +357 -0
  22. package/client/src/components/LocationParameterPanel.tsx +154 -0
  23. package/client/src/components/ModelNode.tsx +286 -0
  24. package/client/src/components/OpenAIChatModelNode.tsx +18 -0
  25. package/client/src/components/OutputPanel.tsx +471 -0
  26. package/client/src/components/ParameterRenderer.tsx +1874 -0
  27. package/client/src/components/SkillEditorModal.tsx +417 -0
  28. package/client/src/components/SquareNode.tsx +797 -0
  29. package/client/src/components/StartNode.tsx +250 -0
  30. package/client/src/components/ToolkitNode.tsx +365 -0
  31. package/client/src/components/TriggerNode.tsx +463 -0
  32. package/client/src/components/auth/LoginPage.tsx +247 -0
  33. package/client/src/components/auth/ProtectedRoute.tsx +59 -0
  34. package/client/src/components/base/BaseChatModelNode.tsx +271 -0
  35. package/client/src/components/icons/AIProviderIcons.tsx +50 -0
  36. package/client/src/components/maps/GoogleMapsPicker.tsx +137 -0
  37. package/client/src/components/maps/MapsPreviewPanel.tsx +110 -0
  38. package/client/src/components/maps/index.ts +26 -0
  39. package/client/src/components/parameterPanel/InputSection.tsx +1094 -0
  40. package/client/src/components/parameterPanel/LocationPanelLayout.tsx +65 -0
  41. package/client/src/components/parameterPanel/MapsSection.tsx +92 -0
  42. package/client/src/components/parameterPanel/MiddleSection.tsx +571 -0
  43. package/client/src/components/parameterPanel/OutputSection.tsx +81 -0
  44. package/client/src/components/parameterPanel/ParameterPanelLayout.tsx +82 -0
  45. package/client/src/components/parameterPanel/ToolSchemaEditor.tsx +436 -0
  46. package/client/src/components/parameterPanel/index.ts +42 -0
  47. package/client/src/components/shared/DataPanel.tsx +142 -0
  48. package/client/src/components/shared/JSONTreeRenderer.tsx +106 -0
  49. package/client/src/components/ui/AIResultModal.tsx +204 -0
  50. package/client/src/components/ui/AndroidSettingsPanel.tsx +401 -0
  51. package/client/src/components/ui/CodeEditor.tsx +81 -0
  52. package/client/src/components/ui/CollapsibleSection.tsx +88 -0
  53. package/client/src/components/ui/ComponentItem.tsx +154 -0
  54. package/client/src/components/ui/ComponentPalette.tsx +321 -0
  55. package/client/src/components/ui/ConsolePanel.tsx +1074 -0
  56. package/client/src/components/ui/ErrorBoundary.tsx +196 -0
  57. package/client/src/components/ui/InputNodesPanel.tsx +204 -0
  58. package/client/src/components/ui/MapSelector.tsx +314 -0
  59. package/client/src/components/ui/Modal.tsx +149 -0
  60. package/client/src/components/ui/NodeContextMenu.tsx +192 -0
  61. package/client/src/components/ui/NodeOutputPanel.tsx +1150 -0
  62. package/client/src/components/ui/OutputDisplayPanel.tsx +381 -0
  63. package/client/src/components/ui/SettingsPanel.tsx +243 -0
  64. package/client/src/components/ui/TopToolbar.tsx +736 -0
  65. package/client/src/components/ui/WhatsAppSettingsPanel.tsx +345 -0
  66. package/client/src/components/ui/WorkflowSidebar.tsx +294 -0
  67. package/client/src/config/antdTheme.ts +186 -0
  68. package/client/src/config/api.ts +54 -0
  69. package/client/src/contexts/AuthContext.tsx +221 -0
  70. package/client/src/contexts/ThemeContext.tsx +42 -0
  71. package/client/src/contexts/WebSocketContext.tsx +1971 -0
  72. package/client/src/factories/baseChatModelFactory.ts +256 -0
  73. package/client/src/hooks/useAndroidOperations.ts +164 -0
  74. package/client/src/hooks/useApiKeyValidation.ts +107 -0
  75. package/client/src/hooks/useApiKeys.ts +238 -0
  76. package/client/src/hooks/useAppTheme.ts +17 -0
  77. package/client/src/hooks/useComponentPalette.ts +51 -0
  78. package/client/src/hooks/useCopyPaste.ts +155 -0
  79. package/client/src/hooks/useDragAndDrop.ts +124 -0
  80. package/client/src/hooks/useDragVariable.ts +88 -0
  81. package/client/src/hooks/useExecution.ts +313 -0
  82. package/client/src/hooks/useParameterPanel.ts +176 -0
  83. package/client/src/hooks/useReactFlowNodes.ts +189 -0
  84. package/client/src/hooks/useToolSchema.ts +209 -0
  85. package/client/src/hooks/useWhatsApp.ts +196 -0
  86. package/client/src/hooks/useWorkflowManagement.ts +46 -0
  87. package/client/src/index.css +315 -0
  88. package/client/src/main.tsx +19 -0
  89. package/client/src/nodeDefinitions/aiAgentNodes.ts +336 -0
  90. package/client/src/nodeDefinitions/aiModelNodes.ts +340 -0
  91. package/client/src/nodeDefinitions/androidDeviceNodes.ts +140 -0
  92. package/client/src/nodeDefinitions/androidServiceNodes.ts +383 -0
  93. package/client/src/nodeDefinitions/chatNodes.ts +135 -0
  94. package/client/src/nodeDefinitions/codeNodes.ts +54 -0
  95. package/client/src/nodeDefinitions/documentNodes.ts +379 -0
  96. package/client/src/nodeDefinitions/index.ts +15 -0
  97. package/client/src/nodeDefinitions/locationNodes.ts +463 -0
  98. package/client/src/nodeDefinitions/schedulerNodes.ts +220 -0
  99. package/client/src/nodeDefinitions/skillNodes.ts +211 -0
  100. package/client/src/nodeDefinitions/toolNodes.ts +198 -0
  101. package/client/src/nodeDefinitions/utilityNodes.ts +284 -0
  102. package/client/src/nodeDefinitions/whatsappNodes.ts +865 -0
  103. package/client/src/nodeDefinitions/workflowNodes.ts +41 -0
  104. package/client/src/nodeDefinitions.ts +104 -0
  105. package/client/src/schemas/workflowSchema.ts +264 -0
  106. package/client/src/services/dynamicParameterService.ts +96 -0
  107. package/client/src/services/execution/aiAgentExecutionService.ts +35 -0
  108. package/client/src/services/executionService.ts +232 -0
  109. package/client/src/services/workflowApi.ts +91 -0
  110. package/client/src/store/useAppStore.ts +582 -0
  111. package/client/src/styles/theme.ts +508 -0
  112. package/client/src/styles/zIndex.ts +17 -0
  113. package/client/src/types/ComponentTypes.ts +39 -0
  114. package/client/src/types/EdgeCondition.ts +231 -0
  115. package/client/src/types/INodeProperties.ts +288 -0
  116. package/client/src/types/NodeTypes.ts +28 -0
  117. package/client/src/utils/formatters.ts +33 -0
  118. package/client/src/utils/googleMapsLoader.ts +140 -0
  119. package/client/src/utils/locationUtils.ts +85 -0
  120. package/client/src/utils/nodeUtils.ts +31 -0
  121. package/client/src/utils/workflow.ts +30 -0
  122. package/client/src/utils/workflowExport.ts +120 -0
  123. package/client/src/vite-env.d.ts +12 -0
  124. package/client/tailwind.config.js +60 -0
  125. package/client/tsconfig.json +25 -0
  126. package/client/tsconfig.node.json +11 -0
  127. package/client/vite.config.js +35 -0
  128. package/docker-compose.prod.yml +107 -0
  129. package/docker-compose.yml +104 -0
  130. package/docs-MachinaOs/README.md +85 -0
  131. package/docs-MachinaOs/deployment/docker.mdx +228 -0
  132. package/docs-MachinaOs/deployment/production.mdx +345 -0
  133. package/docs-MachinaOs/docs.json +75 -0
  134. package/docs-MachinaOs/faq.mdx +309 -0
  135. package/docs-MachinaOs/favicon.svg +5 -0
  136. package/docs-MachinaOs/installation.mdx +160 -0
  137. package/docs-MachinaOs/introduction.mdx +114 -0
  138. package/docs-MachinaOs/logo/dark.svg +6 -0
  139. package/docs-MachinaOs/logo/light.svg +6 -0
  140. package/docs-MachinaOs/nodes/ai-agent.mdx +216 -0
  141. package/docs-MachinaOs/nodes/ai-models.mdx +240 -0
  142. package/docs-MachinaOs/nodes/android.mdx +411 -0
  143. package/docs-MachinaOs/nodes/overview.mdx +181 -0
  144. package/docs-MachinaOs/nodes/schedulers.mdx +316 -0
  145. package/docs-MachinaOs/nodes/webhooks.mdx +330 -0
  146. package/docs-MachinaOs/nodes/whatsapp.mdx +305 -0
  147. package/docs-MachinaOs/quickstart.mdx +119 -0
  148. package/docs-MachinaOs/tutorials/ai-agent-workflow.mdx +177 -0
  149. package/docs-MachinaOs/tutorials/android-automation.mdx +242 -0
  150. package/docs-MachinaOs/tutorials/first-workflow.mdx +134 -0
  151. package/docs-MachinaOs/tutorials/whatsapp-automation.mdx +185 -0
  152. package/nul +0 -0
  153. package/package.json +70 -0
  154. package/scripts/build.js +158 -0
  155. package/scripts/check-ports.ps1 +33 -0
  156. package/scripts/clean.js +40 -0
  157. package/scripts/docker.js +93 -0
  158. package/scripts/kill-port.ps1 +154 -0
  159. package/scripts/start.js +210 -0
  160. package/scripts/stop.js +325 -0
  161. package/server/.dockerignore +44 -0
  162. package/server/Dockerfile +45 -0
  163. package/server/constants.py +249 -0
  164. package/server/core/__init__.py +1 -0
  165. package/server/core/cache.py +461 -0
  166. package/server/core/config.py +128 -0
  167. package/server/core/container.py +99 -0
  168. package/server/core/database.py +1211 -0
  169. package/server/core/logging.py +314 -0
  170. package/server/main.py +289 -0
  171. package/server/middleware/__init__.py +5 -0
  172. package/server/middleware/auth.py +89 -0
  173. package/server/models/__init__.py +1 -0
  174. package/server/models/auth.py +52 -0
  175. package/server/models/cache.py +24 -0
  176. package/server/models/database.py +211 -0
  177. package/server/models/nodes.py +455 -0
  178. package/server/package.json +9 -0
  179. package/server/pyproject.toml +72 -0
  180. package/server/requirements.txt +83 -0
  181. package/server/routers/__init__.py +1 -0
  182. package/server/routers/android.py +294 -0
  183. package/server/routers/auth.py +203 -0
  184. package/server/routers/database.py +151 -0
  185. package/server/routers/maps.py +142 -0
  186. package/server/routers/nodejs_compat.py +289 -0
  187. package/server/routers/webhook.py +90 -0
  188. package/server/routers/websocket.py +2127 -0
  189. package/server/routers/whatsapp.py +761 -0
  190. package/server/routers/workflow.py +200 -0
  191. package/server/services/__init__.py +1 -0
  192. package/server/services/ai.py +2415 -0
  193. package/server/services/android/__init__.py +27 -0
  194. package/server/services/android/broadcaster.py +114 -0
  195. package/server/services/android/client.py +608 -0
  196. package/server/services/android/manager.py +78 -0
  197. package/server/services/android/protocol.py +165 -0
  198. package/server/services/android_service.py +588 -0
  199. package/server/services/auth.py +131 -0
  200. package/server/services/chat_client.py +160 -0
  201. package/server/services/deployment/__init__.py +12 -0
  202. package/server/services/deployment/manager.py +706 -0
  203. package/server/services/deployment/state.py +47 -0
  204. package/server/services/deployment/triggers.py +275 -0
  205. package/server/services/event_waiter.py +785 -0
  206. package/server/services/execution/__init__.py +77 -0
  207. package/server/services/execution/cache.py +769 -0
  208. package/server/services/execution/conditions.py +373 -0
  209. package/server/services/execution/dlq.py +132 -0
  210. package/server/services/execution/executor.py +1351 -0
  211. package/server/services/execution/models.py +531 -0
  212. package/server/services/execution/recovery.py +235 -0
  213. package/server/services/handlers/__init__.py +126 -0
  214. package/server/services/handlers/ai.py +355 -0
  215. package/server/services/handlers/android.py +260 -0
  216. package/server/services/handlers/code.py +278 -0
  217. package/server/services/handlers/document.py +598 -0
  218. package/server/services/handlers/http.py +193 -0
  219. package/server/services/handlers/polyglot.py +105 -0
  220. package/server/services/handlers/tools.py +845 -0
  221. package/server/services/handlers/triggers.py +107 -0
  222. package/server/services/handlers/utility.py +822 -0
  223. package/server/services/handlers/whatsapp.py +476 -0
  224. package/server/services/maps.py +289 -0
  225. package/server/services/memory_store.py +103 -0
  226. package/server/services/node_executor.py +375 -0
  227. package/server/services/parameter_resolver.py +218 -0
  228. package/server/services/polyglot_client.py +169 -0
  229. package/server/services/scheduler.py +155 -0
  230. package/server/services/skill_loader.py +417 -0
  231. package/server/services/status_broadcaster.py +826 -0
  232. package/server/services/temporal/__init__.py +23 -0
  233. package/server/services/temporal/activities.py +344 -0
  234. package/server/services/temporal/client.py +76 -0
  235. package/server/services/temporal/executor.py +147 -0
  236. package/server/services/temporal/worker.py +251 -0
  237. package/server/services/temporal/workflow.py +355 -0
  238. package/server/services/temporal/ws_client.py +236 -0
  239. package/server/services/text.py +111 -0
  240. package/server/services/user_auth.py +172 -0
  241. package/server/services/websocket_client.py +29 -0
  242. package/server/services/workflow.py +597 -0
  243. package/server/skills/android-skill/SKILL.md +82 -0
  244. package/server/skills/assistant-personality/SKILL.md +45 -0
  245. package/server/skills/code-skill/SKILL.md +140 -0
  246. package/server/skills/http-skill/SKILL.md +161 -0
  247. package/server/skills/maps-skill/SKILL.md +170 -0
  248. package/server/skills/memory-skill/SKILL.md +154 -0
  249. package/server/skills/scheduler-skill/SKILL.md +84 -0
  250. package/server/skills/whatsapp-skill/SKILL.md +283 -0
  251. package/server/uv.lock +2916 -0
  252. package/server/whatsapp-rpc/.dockerignore +30 -0
  253. package/server/whatsapp-rpc/Dockerfile +44 -0
  254. package/server/whatsapp-rpc/Dockerfile.web +17 -0
  255. package/server/whatsapp-rpc/README.md +139 -0
  256. package/server/whatsapp-rpc/cli.js +95 -0
  257. package/server/whatsapp-rpc/configs/config.yaml +7 -0
  258. package/server/whatsapp-rpc/docker-compose.yml +35 -0
  259. package/server/whatsapp-rpc/docs/API.md +410 -0
  260. package/server/whatsapp-rpc/go.mod +67 -0
  261. package/server/whatsapp-rpc/go.sum +203 -0
  262. package/server/whatsapp-rpc/package.json +30 -0
  263. package/server/whatsapp-rpc/schema.json +1294 -0
  264. package/server/whatsapp-rpc/scripts/clean.cjs +66 -0
  265. package/server/whatsapp-rpc/scripts/cli.js +162 -0
  266. package/server/whatsapp-rpc/src/go/cmd/server/main.go +91 -0
  267. package/server/whatsapp-rpc/src/go/config/config.go +49 -0
  268. package/server/whatsapp-rpc/src/go/rpc/rpc.go +446 -0
  269. package/server/whatsapp-rpc/src/go/rpc/server.go +112 -0
  270. package/server/whatsapp-rpc/src/go/whatsapp/history.go +166 -0
  271. package/server/whatsapp-rpc/src/go/whatsapp/messages.go +390 -0
  272. package/server/whatsapp-rpc/src/go/whatsapp/service.go +2130 -0
  273. package/server/whatsapp-rpc/src/go/whatsapp/types.go +261 -0
  274. package/server/whatsapp-rpc/src/python/pyproject.toml +15 -0
  275. package/server/whatsapp-rpc/src/python/whatsapp_rpc/__init__.py +4 -0
  276. package/server/whatsapp-rpc/src/python/whatsapp_rpc/client.py +427 -0
  277. package/server/whatsapp-rpc/web/app.py +609 -0
  278. package/server/whatsapp-rpc/web/requirements.txt +6 -0
  279. package/server/whatsapp-rpc/web/rpc_client.py +427 -0
  280. package/server/whatsapp-rpc/web/static/openapi.yaml +59 -0
  281. package/server/whatsapp-rpc/web/templates/base.html +150 -0
  282. package/server/whatsapp-rpc/web/templates/contacts.html +240 -0
  283. package/server/whatsapp-rpc/web/templates/dashboard.html +320 -0
  284. package/server/whatsapp-rpc/web/templates/groups.html +328 -0
  285. package/server/whatsapp-rpc/web/templates/messages.html +465 -0
  286. package/server/whatsapp-rpc/web/templates/messaging.html +681 -0
  287. package/server/whatsapp-rpc/web/templates/send.html +259 -0
  288. package/server/whatsapp-rpc/web/templates/settings.html +459 -0
@@ -0,0 +1,242 @@
1
+ ---
2
+ title: Android Automation
3
+ description: Control Android devices via ADB or remote relay
4
+ ---
5
+
6
+ # Android Automation
7
+
8
+ MachinaOs can control Android devices for automation tasks like launching apps, monitoring battery, controlling WiFi, and more.
9
+
10
+ ## Connection Methods
11
+
12
+ | Method | Use Case |
13
+ |--------|----------|
14
+ | **Local ADB** | Device connected via USB to your machine |
15
+ | **Remote Relay** | Device connected via WebSocket relay server |
16
+
17
+ ## Step 1: Set Up Connection
18
+
19
+ ### Option A: Local ADB
20
+
21
+ 1. Enable **Developer Options** on your Android device
22
+ 2. Enable **USB Debugging**
23
+ 3. Connect device via USB
24
+ 4. Run `adb devices` to verify connection
25
+
26
+ ### Option B: Remote Relay
27
+
28
+ 1. Click the **Android icon** in the toolbar
29
+ 2. Enter your relay URL and API key in Credentials
30
+ 3. Click **Connect**
31
+ 4. Scan the QR code with the companion Android app
32
+
33
+ <Info>
34
+ Remote relay allows controlling devices anywhere with internet access.
35
+ </Info>
36
+
37
+ ## Step 2: Add Android Device Setup
38
+
39
+ 1. Drag **Android Device Setup** from Android category
40
+ 2. Configure connection type:
41
+
42
+ **Local ADB:**
43
+ ```
44
+ Connection Type: Local ADB Device
45
+ Device ID: [Select from dropdown]
46
+ Auto Forward: true
47
+ Port: 8888
48
+ ```
49
+
50
+ **Remote:**
51
+ ```
52
+ Connection Type: Remote WebSocket
53
+ ```
54
+
55
+ ## Available Android Nodes
56
+
57
+ ### System Monitoring
58
+ | Node | Description |
59
+ |------|-------------|
60
+ | Battery Monitor | Battery level, charging status, temperature |
61
+ | Network Monitor | WiFi/cellular status, internet connectivity |
62
+ | System Info | Device model, Android version, memory |
63
+ | Location | GPS coordinates, accuracy, provider |
64
+
65
+ ### App Management
66
+ | Node | Description |
67
+ |------|-------------|
68
+ | App Launcher | Launch apps by package name |
69
+ | App List | Get installed applications |
70
+
71
+ ### Automation
72
+ | Node | Description |
73
+ |------|-------------|
74
+ | WiFi Automation | Enable/disable WiFi, scan networks |
75
+ | Bluetooth Automation | Toggle Bluetooth, list paired devices |
76
+ | Audio Automation | Volume control, mute/unmute |
77
+ | Device State | Airplane mode, brightness, screen |
78
+ | Screen Control | Wake screen, timeout settings |
79
+
80
+ ### Sensors
81
+ | Node | Description |
82
+ |------|-------------|
83
+ | Motion Detection | Accelerometer, gyroscope, shake detection |
84
+ | Environmental Sensors | Temperature, humidity, pressure, light |
85
+
86
+ ### Media
87
+ | Node | Description |
88
+ |------|-------------|
89
+ | Camera Control | Take photos, get camera info |
90
+ | Media Control | Playback control, volume |
91
+
92
+ ## Example: Battery Alert Workflow
93
+
94
+ Create a workflow that sends an alert when battery is low.
95
+
96
+ ### Workflow Design
97
+
98
+ ```
99
+ [Cron Scheduler] --> [Battery Monitor] --> [Python Executor] --> [WhatsApp Send]
100
+ (check level)
101
+ ```
102
+
103
+ ### Step 1: Add Cron Trigger
104
+ ```
105
+ Cron Expression: */10 * * * * (every 10 minutes)
106
+ ```
107
+
108
+ ### Step 2: Add Battery Monitor
109
+ ```
110
+ Action: Get Status
111
+ ```
112
+
113
+ ### Step 3: Add Python Executor
114
+ ```python
115
+ battery_level = input_data.get("level", 100)
116
+ is_charging = input_data.get("is_charging", False)
117
+
118
+ if battery_level < 20 and not is_charging:
119
+ output = {
120
+ "alert": True,
121
+ "message": f"Battery low: {battery_level}%"
122
+ }
123
+ else:
124
+ output = {"alert": False}
125
+ ```
126
+
127
+ ### Step 4: Add WhatsApp Send (conditional)
128
+ ```
129
+ Phone Number: +1234567890
130
+ Message: {{pythonExecutor.message}}
131
+ ```
132
+
133
+ ## Example: App Launcher Workflow
134
+
135
+ Launch an app when receiving a webhook.
136
+
137
+ ```
138
+ [Webhook Trigger] --> [App Launcher]
139
+ ```
140
+
141
+ **App Launcher Config:**
142
+ ```
143
+ Package Name: {{webhookTrigger.body.app}}
144
+ ```
145
+
146
+ **Test:**
147
+ ```bash
148
+ curl -X POST http://localhost:3010/webhook/launch \
149
+ -H "Content-Type: application/json" \
150
+ -d '{"app": "com.spotify.music"}'
151
+ ```
152
+
153
+ ## Example: WiFi Toggle
154
+
155
+ ```
156
+ [Webhook Trigger] --> [WiFi Automation]
157
+ ```
158
+
159
+ **WiFi Automation Config:**
160
+ ```
161
+ Action: {{webhookTrigger.body.action}}
162
+ ```
163
+
164
+ **Test:**
165
+ ```bash
166
+ # Enable WiFi
167
+ curl -X POST http://localhost:3010/webhook/wifi \
168
+ -d '{"action": "enable"}'
169
+
170
+ # Disable WiFi
171
+ curl -X POST http://localhost:3010/webhook/wifi \
172
+ -d '{"action": "disable"}'
173
+ ```
174
+
175
+ ## Battery Monitor Output
176
+
177
+ ```json
178
+ {
179
+ "level": 85,
180
+ "is_charging": true,
181
+ "status": "charging",
182
+ "plugged": "ac",
183
+ "temperature": 28.5,
184
+ "health": "good",
185
+ "technology": "Li-ion"
186
+ }
187
+ ```
188
+
189
+ ## Network Monitor Output
190
+
191
+ ```json
192
+ {
193
+ "is_connected": true,
194
+ "type": "wifi",
195
+ "wifi_ssid": "MyNetwork",
196
+ "is_internet_available": true,
197
+ "ip_address": "192.168.1.100"
198
+ }
199
+ ```
200
+
201
+ ## Troubleshooting
202
+
203
+ <Accordion title="Device not showing in dropdown">
204
+ - Run `adb devices` to check connection
205
+ - Ensure USB debugging is enabled
206
+ - Try different USB cable/port
207
+ - Restart ADB: `adb kill-server && adb start-server`
208
+ </Accordion>
209
+
210
+ <Accordion title="Remote relay won't connect">
211
+ - Verify relay URL is correct
212
+ - Check API key is valid
213
+ - Ensure companion app is installed on device
214
+ - Check firewall settings
215
+ </Accordion>
216
+
217
+ <Accordion title="Commands fail with permission error">
218
+ - Some actions require root access
219
+ - Use device automation apps for restricted features
220
+ - Check Android version compatibility
221
+ </Accordion>
222
+
223
+ ## Tips
224
+
225
+ <Tip>
226
+ Start with Battery Monitor and System Info to verify your connection works before building complex workflows.
227
+ </Tip>
228
+
229
+ <Tip>
230
+ Use meaningful node names (F2 to rename) when building workflows with multiple Android nodes.
231
+ </Tip>
232
+
233
+ ## Next Steps
234
+
235
+ <CardGroup cols={2}>
236
+ <Card title="Android Node Reference" icon="mobile" href="/nodes/android">
237
+ Full documentation for all 17 nodes
238
+ </Card>
239
+ <Card title="Webhooks" icon="webhook" href="/nodes/webhooks">
240
+ Trigger Android actions via HTTP
241
+ </Card>
242
+ </CardGroup>
@@ -0,0 +1,134 @@
1
+ ---
2
+ title: Your First Workflow
3
+ description: Learn the basics of building workflows in MachinaOs
4
+ ---
5
+
6
+ # Your First Workflow
7
+
8
+ This tutorial covers the fundamentals of creating workflows in MachinaOs.
9
+
10
+ ## Understanding the Interface
11
+
12
+ ### Canvas
13
+ The main area where you build workflows by connecting nodes.
14
+
15
+ ### Component Palette
16
+ Left sidebar with all available nodes organized by category:
17
+ - **AI Models** - Chat models (OpenAI, Claude, Gemini)
18
+ - **AI Agents** - Agent and memory nodes
19
+ - **WhatsApp** - Messaging automation
20
+ - **Android** - Device control
21
+ - **Utilities** - HTTP, webhooks, code execution
22
+ - **Schedulers** - Triggers and timers
23
+
24
+ ### Toolbar
25
+ Top bar with workflow controls:
26
+ - **File** - New, Open, Save, Export
27
+ - **Run** - Execute selected node
28
+ - **Deploy** - Start workflow triggers
29
+ - **Stop** - Cancel execution
30
+
31
+ ## Node Basics
32
+
33
+ ### Adding Nodes
34
+ 1. **Drag and drop** from the component palette
35
+ 2. **Right-click** on canvas to search nodes
36
+
37
+ ### Connecting Nodes
38
+ - Drag from an **output handle** (right side) to an **input handle** (left side)
39
+ - Handles are the small circles on node edges
40
+
41
+ ### Node Types
42
+
43
+ | Type | Shape | Description |
44
+ |------|-------|-------------|
45
+ | Trigger | Diamond | Start workflow on events |
46
+ | Action | Square | Perform operations |
47
+ | Config | Circle | Provide configuration to other nodes |
48
+
49
+ ### Configuring Nodes
50
+ 1. Click a node to select it
51
+ 2. Click the **gear icon** or double-click to open parameters
52
+ 3. Set values and click **Save**
53
+
54
+ ## Data Flow
55
+
56
+ Data flows through connections between nodes. Use template variables to access upstream data:
57
+
58
+ ```
59
+ {{nodeName.outputField}}
60
+ ```
61
+
62
+ ### Example
63
+ If a Webhook Trigger outputs `{ body: "Hello" }`:
64
+
65
+ ```
66
+ {{webhookTrigger.body}} --> "Hello"
67
+ ```
68
+
69
+ ## Building a Simple Workflow
70
+
71
+ Let's build a workflow that triggers on a schedule and logs the time.
72
+
73
+ ### Step 1: Add a Cron Trigger
74
+
75
+ 1. Drag **Cron Scheduler** from Schedulers
76
+ 2. Configure:
77
+ ```
78
+ Cron Expression: */5 * * * * (every 5 minutes)
79
+ ```
80
+
81
+ ### Step 2: Add a Python Executor
82
+
83
+ 1. Drag **Python Executor** from Utilities
84
+ 2. Connect Cron output to Python input
85
+ 3. Add this code:
86
+
87
+ ```python
88
+ from datetime import datetime
89
+
90
+ current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
91
+ output = {"time": current_time, "message": f"Triggered at {current_time}"}
92
+ ```
93
+
94
+ ### Step 3: Deploy
95
+
96
+ 1. Click **Deploy** in the toolbar
97
+ 2. The workflow will run every 5 minutes
98
+ 3. Click **Stop** to cancel
99
+
100
+ ## Keyboard Shortcuts
101
+
102
+ | Shortcut | Action |
103
+ |----------|--------|
104
+ | `Ctrl+N` | New workflow |
105
+ | `Ctrl+S` | Save workflow |
106
+ | `F2` | Rename selected node |
107
+ | `Delete` | Delete selected node |
108
+ | `Ctrl+C` | Copy node |
109
+ | `Ctrl+V` | Paste node |
110
+
111
+ ## Tips
112
+
113
+ <Tip>
114
+ **Rename nodes** for clarity. Press `F2` or double-click the node label.
115
+ </Tip>
116
+
117
+ <Tip>
118
+ **Test individual nodes** by selecting them and clicking **Run** before deploying the full workflow.
119
+ </Tip>
120
+
121
+ <Warning>
122
+ Always **save your workflow** before deploying. Unsaved changes are lost on refresh.
123
+ </Warning>
124
+
125
+ ## Next Steps
126
+
127
+ <CardGroup cols={2}>
128
+ <Card title="AI Agent Workflow" icon="robot" href="/tutorials/ai-agent-workflow">
129
+ Build an intelligent agent with memory
130
+ </Card>
131
+ <Card title="Node Overview" icon="grid" href="/nodes/overview">
132
+ Learn about all node types
133
+ </Card>
134
+ </CardGroup>
@@ -0,0 +1,185 @@
1
+ ---
2
+ title: WhatsApp Automation
3
+ description: Send and receive WhatsApp messages automatically
4
+ ---
5
+
6
+ # WhatsApp Automation
7
+
8
+ Automate WhatsApp messaging with MachinaOs. Receive messages, process them, and send responses.
9
+
10
+ ## Prerequisites
11
+
12
+ - MachinaOs running with the WhatsApp service
13
+ - A WhatsApp account for pairing
14
+
15
+ ## Understanding WhatsApp Nodes
16
+
17
+ | Node | Purpose |
18
+ |------|---------|
19
+ | **WhatsApp Connect** | Check connection status |
20
+ | **WhatsApp Receive** | Trigger on incoming messages |
21
+ | **WhatsApp Send** | Send messages to contacts/groups |
22
+
23
+ ## Step 1: Connect WhatsApp
24
+
25
+ 1. Click the **WhatsApp icon** in the toolbar (or add WhatsApp Connect node)
26
+ 2. A modal appears with a QR code
27
+ 3. Open WhatsApp on your phone > Settings > Linked Devices > Link a Device
28
+ 4. Scan the QR code
29
+ 5. Wait for "Connected" status
30
+
31
+ <Warning>
32
+ Keep the WhatsApp service running. If it stops, you'll need to re-scan the QR code.
33
+ </Warning>
34
+
35
+ ## Step 2: Create a Message Responder
36
+
37
+ Let's build a workflow that auto-replies to incoming messages.
38
+
39
+ ### Add WhatsApp Receive Trigger
40
+
41
+ 1. Drag **WhatsApp Receive** from the WhatsApp category
42
+ 2. Configure the trigger:
43
+
44
+ ```
45
+ Message Type Filter: All Messages
46
+ Sender Filter: All Messages
47
+ Ignore Own Messages: true
48
+ ```
49
+
50
+ ### Filter Options
51
+
52
+ | Filter | Description |
53
+ |--------|-------------|
54
+ | All Messages | Receive everything |
55
+ | From Any Contact | Non-group messages only |
56
+ | From Specific Contact | Filter by phone number |
57
+ | From Specific Group | Filter by group |
58
+ | Contains Keywords | Match specific words |
59
+
60
+ ## Step 3: Add an AI Response
61
+
62
+ 1. Drag **OpenAI Chat Model** onto the canvas
63
+ 2. Connect WhatsApp Receive output to AI input
64
+ 3. Configure:
65
+
66
+ ```
67
+ Model: gpt-4o-mini
68
+ Prompt: "Reply to this WhatsApp message: {{whatsappReceive.text}}"
69
+ ```
70
+
71
+ ## Step 4: Send the Response
72
+
73
+ 1. Drag **WhatsApp Send** onto the canvas
74
+ 2. Connect AI output to WhatsApp Send input
75
+ 3. Configure:
76
+
77
+ ```
78
+ Phone Number: {{whatsappReceive.sender_phone}}
79
+ Message: {{openaiChatModel.response}}
80
+ ```
81
+
82
+ ## Complete Workflow
83
+
84
+ ```
85
+ [WhatsApp Receive] --> [OpenAI Chat] --> [WhatsApp Send]
86
+ ```
87
+
88
+ ## Step 5: Deploy
89
+
90
+ 1. Click **Deploy**
91
+ 2. Send a message to your linked WhatsApp number
92
+ 3. The workflow triggers and sends an AI response
93
+
94
+ ## Available Data from WhatsApp Receive
95
+
96
+ | Field | Type | Description |
97
+ |-------|------|-------------|
98
+ | `message_id` | string | Unique message ID |
99
+ | `sender` | string | Sender JID |
100
+ | `sender_phone` | string | Phone number |
101
+ | `chat_id` | string | Chat/group ID |
102
+ | `message_type` | string | text, image, video, etc. |
103
+ | `text` | string | Message content |
104
+ | `timestamp` | string | When message was sent |
105
+ | `is_group` | boolean | True if from a group |
106
+ | `is_from_me` | boolean | True if sent by you |
107
+ | `push_name` | string | Sender's display name |
108
+ | `is_forwarded` | boolean | True if forwarded |
109
+ | `group_info` | object | Group details (if group message) |
110
+
111
+ ## Group Message Handling
112
+
113
+ For group messages, use:
114
+
115
+ ```
116
+ {{whatsappReceive.group_info.group_jid}}
117
+ {{whatsappReceive.group_info.sender_name}}
118
+ {{whatsappReceive.group_info.sender_phone}}
119
+ ```
120
+
121
+ ## Example: Keyword-Based Response
122
+
123
+ Set up different responses based on keywords:
124
+
125
+ ### Configuration
126
+ ```
127
+ Sender Filter: Contains Keywords
128
+ Keywords: help, support, question
129
+ ```
130
+
131
+ ### AI Prompt
132
+ ```
133
+ The user needs help. Their message: {{whatsappReceive.text}}
134
+ Provide a helpful response.
135
+ ```
136
+
137
+ ## Example: Group Bot
138
+
139
+ Reply only in specific groups:
140
+
141
+ ```
142
+ Sender Filter: From Specific Group
143
+ Group: [Select from dropdown]
144
+ ```
145
+
146
+ ## Troubleshooting
147
+
148
+ <Accordion title="QR code not appearing">
149
+ - Ensure the WhatsApp service is running on port 5000
150
+ - Check Docker logs: `docker-compose logs whatsapp`
151
+ - Restart the service: `docker-compose restart whatsapp`
152
+ </Accordion>
153
+
154
+ <Accordion title="Messages not being received">
155
+ - Verify the trigger is deployed (not just saved)
156
+ - Check "Ignore Own Messages" setting
157
+ - Ensure filters aren't too restrictive
158
+ </Accordion>
159
+
160
+ <Accordion title="Send fails with error">
161
+ - Verify phone number format (include country code)
162
+ - Check WhatsApp connection status
163
+ - Ensure recipient hasn't blocked you
164
+ </Accordion>
165
+
166
+ ## Tips
167
+
168
+ <Tip>
169
+ Use **Simple Memory** with WhatsApp for context-aware conversations. Set Session ID to `{{whatsappReceive.sender_phone}}` for per-contact memory.
170
+ </Tip>
171
+
172
+ <Tip>
173
+ Test with your own number first before deploying to production.
174
+ </Tip>
175
+
176
+ ## Next Steps
177
+
178
+ <CardGroup cols={2}>
179
+ <Card title="Android Automation" icon="mobile" href="/tutorials/android-automation">
180
+ Control Android devices
181
+ </Card>
182
+ <Card title="WhatsApp Node Reference" icon="book" href="/nodes/whatsapp">
183
+ Full node documentation
184
+ </Card>
185
+ </CardGroup>
package/nul ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "machinaos",
3
+ "version": "0.0.1",
4
+ "description": "Open source workflow automation platform with AI agents, React Flow, and n8n-inspired architecture",
5
+ "type": "module",
6
+ "keywords": [
7
+ "workflow",
8
+ "automation",
9
+ "react-flow",
10
+ "ai-agent",
11
+ "langchain",
12
+ "langgraph",
13
+ "n8n",
14
+ "whatsapp",
15
+ "android",
16
+ "low-code",
17
+ "no-code"
18
+ ],
19
+ "author": "Rohit G <trohitg@gmail.com>",
20
+ "license": "MIT",
21
+ "homepage": "https://github.com/trohitg/MachinaOS#readme",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/trohitg/MachinaOS.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/trohitg/MachinaOS/issues"
28
+ },
29
+ "bin": {
30
+ "machinaos": "./bin/cli.js"
31
+ },
32
+ "engines": {
33
+ "node": ">=18.0.0"
34
+ },
35
+ "workspaces": [
36
+ "client"
37
+ ],
38
+ "scripts": {
39
+ "dev": "concurrently --raw --kill-others-on-fail \"npm:client:dev\" \"npm:python:dev\" \"npm:whatsapp:api\"",
40
+ "dev:temporal": "concurrently --raw --kill-others-on-fail \"npm:client:dev\" \"npm:python:dev\" \"npm:whatsapp:api\" \"npm:temporal:worker\"",
41
+ "temporal:worker": "cd server && uv run python -m services.temporal.worker",
42
+ "client:dev": "cd client && npm run dev",
43
+ "python:dev": "cd server && uv run uvicorn main:app --host 127.0.0.1 --port 3010 --reload --reload-dir . --reload-exclude \"*.pyc\" --reload-exclude \"__pycache__\" --log-level warning",
44
+ "whatsapp:start": "cd server/whatsapp-rpc && npm start",
45
+ "whatsapp:stop": "cd server/whatsapp-rpc && npm stop",
46
+ "whatsapp:status": "cd server/whatsapp-rpc && npm run status",
47
+ "whatsapp:api": "cd server/whatsapp-rpc && npm run api",
48
+ "whatsapp:build": "cd server/whatsapp-rpc && npm run build",
49
+ "build": "node scripts/build.js",
50
+ "clean": "node scripts/clean.js",
51
+ "start": "node scripts/start.js",
52
+ "stop": "node scripts/stop.js",
53
+ "docker:up": "node scripts/docker.js up",
54
+ "docker:down": "node scripts/docker.js down",
55
+ "docker:logs": "node scripts/docker.js logs",
56
+ "docker:build": "node scripts/docker.js build",
57
+ "docker:restart": "node scripts/docker.js restart",
58
+ "docker:prod:up": "docker-compose -f docker-compose.prod.yml up -d",
59
+ "docker:prod:down": "docker-compose -f docker-compose.prod.yml down",
60
+ "docker:prod:build": "docker-compose -f docker-compose.prod.yml build",
61
+ "docker:prod:logs": "docker-compose -f docker-compose.prod.yml logs -f",
62
+ "deploy": "bash deploy.sh",
63
+ "deploy:gcp": "bash deploy.sh"
64
+ },
65
+ "devDependencies": {
66
+ "concurrently": "^9.2.1",
67
+ "cross-env": "^7.0.3",
68
+ "rimraf": "^6.0.1"
69
+ }
70
+ }