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.
- package/.env.template +16 -0
- package/client/package.json +1 -1
- package/client/src/Dashboard.tsx +3 -3
- package/client/src/components/AIAgentNode.tsx +24 -12
- package/client/src/components/OutputPanel.tsx +3 -2
- package/client/src/components/parameterPanel/InputSection.tsx +16 -3
- package/client/src/nodeDefinitions/aiAgentNodes.ts +12 -0
- package/client/src/nodeDefinitions/specializedAgentNodes.ts +68 -320
- package/client/src/nodeDefinitions/toolNodes.ts +87 -1
- package/client/src/nodeDefinitions/workflowNodes.ts +55 -1
- package/package.json +12 -3
- package/scripts/daemon.js +427 -0
- package/scripts/start.js +7 -1
- package/scripts/sync-version.js +108 -0
- package/server/Dockerfile +6 -7
- package/server/constants.py +2 -0
- package/server/core/cleanup.py +123 -0
- package/server/core/config.py +16 -0
- package/server/core/database.py +92 -1
- package/server/core/health.py +121 -0
- package/server/examples/__init__.py +1 -0
- package/server/gunicorn.conf.py +46 -0
- package/server/main.py +38 -3
- package/server/models/database.py +1 -0
- package/server/models/nodes.py +18 -2
- package/server/requirements-docker.txt +86 -0
- package/server/routers/database.py +16 -0
- package/server/routers/websocket.py +6 -5
- package/server/services/ai.py +115 -14
- package/server/services/auth.py +6 -1
- package/server/services/deployment/manager.py +14 -0
- package/server/services/event_waiter.py +55 -0
- package/server/services/example_loader.py +60 -0
- package/server/services/execution/executor.py +2 -0
- package/server/services/execution/models.py +8 -0
- package/server/services/handlers/__init__.py +2 -0
- package/server/services/handlers/ai.py +164 -11
- package/server/services/handlers/document.py +13 -4
- package/server/services/handlers/tools.py +445 -14
- package/server/services/node_executor.py +3 -0
- package/server/services/temporal/activities.py +3 -0
- package/server/services/workflow.py +2 -0
- package/server/skills/android_agent/app-launcher-skill/SKILL.md +137 -0
- package/server/skills/android_agent/app-list-skill/SKILL.md +148 -0
- package/server/skills/android_agent/audio-skill/SKILL.md +169 -0
- package/server/skills/android_agent/battery-skill/SKILL.md +114 -0
- package/server/skills/android_agent/bluetooth-skill/SKILL.md +151 -0
- package/server/skills/android_agent/camera-skill/SKILL.md +148 -0
- package/server/skills/android_agent/environmental-skill/SKILL.md +140 -0
- package/server/skills/android_agent/location-skill/SKILL.md +163 -0
- package/server/skills/android_agent/motion-skill/SKILL.md +141 -0
- package/server/skills/android_agent/screen-control-skill/SKILL.md +164 -0
- package/server/skills/android_agent/wifi-skill/SKILL.md +182 -0
- package/server/skills/assistant/subagent-skill/SKILL.md +205 -0
- package/server/skills/coding_agent/javascript-skill/SKILL.md +196 -0
- package/server/skills/coding_agent/python-skill/SKILL.md +165 -0
- package/server/skills/social_agent/whatsapp-db-skill/SKILL.md +284 -0
- package/server/skills/social_agent/whatsapp-send-skill/SKILL.md +180 -0
- package/server/skills/task_agent/cron-scheduler-skill/SKILL.md +215 -0
- package/server/skills/task_agent/task-manager-skill/SKILL.md +251 -0
- package/server/skills/task_agent/timer-skill/SKILL.md +168 -0
- package/server/skills/travel_agent/geocoding-skill/SKILL.md +186 -0
- package/server/skills/travel_agent/nearby-places-skill/SKILL.md +234 -0
- package/server/skills/web_agent/http-request-skill/SKILL.md +211 -0
- package/server/skills/android/skill/SKILL.md +0 -84
- package/server/skills/assistant/code-skill/SKILL.md +0 -176
- package/server/skills/assistant/http-skill/SKILL.md +0 -163
- package/server/skills/assistant/maps-skill/SKILL.md +0 -172
- package/server/skills/assistant/scheduler-skill/SKILL.md +0 -86
- package/server/skills/assistant/whatsapp-skill/SKILL.md +0 -285
- /package/server/skills/{android → android_agent}/personality/SKILL.md +0 -0
- /package/server/skills/{assistant → web_agent}/web-search-skill/SKILL.md +0 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: whatsapp-send-skill
|
|
3
|
+
description: Send WhatsApp messages to contacts or groups. Supports text, images, videos, audio, documents, stickers, locations, and contacts.
|
|
4
|
+
allowed-tools: whatsapp_send
|
|
5
|
+
metadata:
|
|
6
|
+
author: machina
|
|
7
|
+
version: "1.0"
|
|
8
|
+
category: messaging
|
|
9
|
+
icon: "📤"
|
|
10
|
+
color: "#25D366"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# WhatsApp Send Tool
|
|
14
|
+
|
|
15
|
+
Send messages to WhatsApp contacts or groups.
|
|
16
|
+
|
|
17
|
+
## How It Works
|
|
18
|
+
|
|
19
|
+
This skill provides instructions for the **WhatsApp Send** tool node. Connect the **WhatsApp Send** node to Zeenie's `input-tools` handle to enable message sending.
|
|
20
|
+
|
|
21
|
+
## whatsapp_send Tool
|
|
22
|
+
|
|
23
|
+
Send messages to individual contacts or groups.
|
|
24
|
+
|
|
25
|
+
### Schema Fields
|
|
26
|
+
|
|
27
|
+
| Field | Type | Required | Description |
|
|
28
|
+
|-------|------|----------|-------------|
|
|
29
|
+
| recipient_type | string | Yes | `"phone"` for individual or `"group"` for group chat |
|
|
30
|
+
| phone | string | If phone | Phone number without + prefix (e.g., `1234567890`) |
|
|
31
|
+
| group_id | string | If group | Group JID (e.g., `123456789@g.us`) |
|
|
32
|
+
| message_type | string | Yes | Message type (see below) |
|
|
33
|
+
| message | string | If text | Text message content |
|
|
34
|
+
| media_url | string | If media | URL for image/video/audio/document/sticker |
|
|
35
|
+
| caption | string | No | Caption for media messages |
|
|
36
|
+
| latitude | float | If location | Latitude coordinate |
|
|
37
|
+
| longitude | float | If location | Longitude coordinate |
|
|
38
|
+
| location_name | string | No | Display name for location |
|
|
39
|
+
| address | string | No | Address text for location |
|
|
40
|
+
| contact_name | string | If contact | Contact display name |
|
|
41
|
+
| vcard | string | If contact | vCard 3.0 format string |
|
|
42
|
+
|
|
43
|
+
### Message Types
|
|
44
|
+
|
|
45
|
+
| Type | Required Fields | Description |
|
|
46
|
+
|------|-----------------|-------------|
|
|
47
|
+
| `text` | message | Plain text message |
|
|
48
|
+
| `image` | media_url | Image file (JPG, PNG, GIF) |
|
|
49
|
+
| `video` | media_url | Video file (MP4) |
|
|
50
|
+
| `audio` | media_url | Audio file (MP3, OGG, WAV) |
|
|
51
|
+
| `document` | media_url | Any file type |
|
|
52
|
+
| `sticker` | media_url | Sticker image (WebP) |
|
|
53
|
+
| `location` | latitude, longitude | GPS coordinates |
|
|
54
|
+
| `contact` | contact_name, vcard | Contact card |
|
|
55
|
+
|
|
56
|
+
### Examples
|
|
57
|
+
|
|
58
|
+
**Send text message to contact:**
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"recipient_type": "phone",
|
|
62
|
+
"phone": "1234567890",
|
|
63
|
+
"message_type": "text",
|
|
64
|
+
"message": "Hello! How are you?"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Send image with caption:**
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"recipient_type": "phone",
|
|
72
|
+
"phone": "1234567890",
|
|
73
|
+
"message_type": "image",
|
|
74
|
+
"media_url": "https://example.com/photo.jpg",
|
|
75
|
+
"caption": "Check out this photo!"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Send to group:**
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"recipient_type": "group",
|
|
83
|
+
"group_id": "123456789012345678@g.us",
|
|
84
|
+
"message_type": "text",
|
|
85
|
+
"message": "Hello everyone!"
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Send video:**
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"recipient_type": "phone",
|
|
93
|
+
"phone": "1234567890",
|
|
94
|
+
"message_type": "video",
|
|
95
|
+
"media_url": "https://example.com/video.mp4",
|
|
96
|
+
"caption": "Check this video"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Send document:**
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"recipient_type": "phone",
|
|
104
|
+
"phone": "1234567890",
|
|
105
|
+
"message_type": "document",
|
|
106
|
+
"media_url": "https://example.com/report.pdf",
|
|
107
|
+
"caption": "Here's the report"
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Send location:**
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"recipient_type": "phone",
|
|
115
|
+
"phone": "1234567890",
|
|
116
|
+
"message_type": "location",
|
|
117
|
+
"latitude": 37.7749,
|
|
118
|
+
"longitude": -122.4194,
|
|
119
|
+
"location_name": "San Francisco",
|
|
120
|
+
"address": "San Francisco, CA, USA"
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Send contact card:**
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"recipient_type": "phone",
|
|
128
|
+
"phone": "1234567890",
|
|
129
|
+
"message_type": "contact",
|
|
130
|
+
"contact_name": "John Doe",
|
|
131
|
+
"vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:John Doe\nTEL:+1234567890\nEND:VCARD"
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Response Format
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"success": true,
|
|
140
|
+
"recipient": "1234567890",
|
|
141
|
+
"recipient_type": "phone",
|
|
142
|
+
"message_type": "text",
|
|
143
|
+
"details": {
|
|
144
|
+
"status": "sent",
|
|
145
|
+
"preview": "Hello! How are you?",
|
|
146
|
+
"timestamp": "2025-01-30T12:00:00"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Error Response
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"error": "Phone number is required for recipient_type='phone'"
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Guidelines
|
|
160
|
+
|
|
161
|
+
1. **Phone numbers**: Always use without + prefix, just digits (e.g., `919876543210`)
|
|
162
|
+
2. **Group IDs**: Use JID format ending in `@g.us` (e.g., `123456789@g.us`)
|
|
163
|
+
3. **Media URLs**: Must be publicly accessible URLs (https://)
|
|
164
|
+
4. **vCard format**: Use vCard 3.0 specification for contact cards
|
|
165
|
+
5. **Message length**: Text messages can be up to 4096 characters
|
|
166
|
+
6. **Media size**: Check WhatsApp limits for media file sizes
|
|
167
|
+
|
|
168
|
+
## Common Use Cases
|
|
169
|
+
|
|
170
|
+
- Send automated notifications to contacts
|
|
171
|
+
- Forward messages to groups
|
|
172
|
+
- Share media files
|
|
173
|
+
- Send location information
|
|
174
|
+
- Share contact information
|
|
175
|
+
|
|
176
|
+
## Setup Requirements
|
|
177
|
+
|
|
178
|
+
1. Connect the **WhatsApp Send** node to Zeenie's `input-tools` handle
|
|
179
|
+
2. Ensure WhatsApp is connected (green status indicator in Credentials)
|
|
180
|
+
3. The recipient must have WhatsApp installed
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cron-scheduler-skill
|
|
3
|
+
description: Schedule recurring tasks using cron expressions. Run workflows on schedules (daily, weekly, hourly, etc.).
|
|
4
|
+
allowed-tools: cron_scheduler
|
|
5
|
+
metadata:
|
|
6
|
+
author: machina
|
|
7
|
+
version: "1.0"
|
|
8
|
+
category: automation
|
|
9
|
+
icon: "📅"
|
|
10
|
+
color: "#8B5CF6"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Cron Scheduler Tool
|
|
14
|
+
|
|
15
|
+
Schedule recurring tasks using cron expressions.
|
|
16
|
+
|
|
17
|
+
## How It Works
|
|
18
|
+
|
|
19
|
+
This skill provides instructions for the **Cron Scheduler** tool node. Connect the **Cron Scheduler** node to Zeenie's `input-tools` handle or use as a workflow trigger.
|
|
20
|
+
|
|
21
|
+
## cron_scheduler Tool
|
|
22
|
+
|
|
23
|
+
Create recurring schedules using cron expressions.
|
|
24
|
+
|
|
25
|
+
### Schema Fields
|
|
26
|
+
|
|
27
|
+
| Field | Type | Required | Description |
|
|
28
|
+
|-------|------|----------|-------------|
|
|
29
|
+
| expression | string | Yes | Cron expression (5 fields) |
|
|
30
|
+
| timezone | string | No | Timezone (default: UTC) |
|
|
31
|
+
|
|
32
|
+
### Cron Expression Format
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
* * * * *
|
|
36
|
+
│ │ │ │ │
|
|
37
|
+
│ │ │ │ └── Day of week (0-7, Sun=0 or 7)
|
|
38
|
+
│ │ │ └──── Month (1-12)
|
|
39
|
+
│ │ └────── Day of month (1-31)
|
|
40
|
+
│ └──────── Hour (0-23)
|
|
41
|
+
└────────── Minute (0-59)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Special Characters
|
|
45
|
+
|
|
46
|
+
| Character | Meaning | Example |
|
|
47
|
+
|-----------|---------|---------|
|
|
48
|
+
| `*` | Any value | `* * * * *` (every minute) |
|
|
49
|
+
| `,` | List of values | `1,15 * * * *` (minute 1 and 15) |
|
|
50
|
+
| `-` | Range | `1-5 * * * *` (minutes 1-5) |
|
|
51
|
+
| `/` | Step values | `*/15 * * * *` (every 15 minutes) |
|
|
52
|
+
|
|
53
|
+
### Common Patterns
|
|
54
|
+
|
|
55
|
+
| Pattern | Description | Cron Expression |
|
|
56
|
+
|---------|-------------|-----------------|
|
|
57
|
+
| Every minute | Runs each minute | `* * * * *` |
|
|
58
|
+
| Every 5 minutes | Runs at :00, :05, :10... | `*/5 * * * *` |
|
|
59
|
+
| Every 15 minutes | Runs at :00, :15, :30, :45 | `*/15 * * * *` |
|
|
60
|
+
| Every hour | Runs at minute 0 | `0 * * * *` |
|
|
61
|
+
| Every day at 9 AM | Morning job | `0 9 * * *` |
|
|
62
|
+
| Every day at midnight | Nightly job | `0 0 * * *` |
|
|
63
|
+
| Weekdays at 9 AM | Mon-Fri morning | `0 9 * * 1-5` |
|
|
64
|
+
| Every Monday | Weekly on Monday | `0 0 * * 1` |
|
|
65
|
+
| First of month | Monthly job | `0 0 1 * *` |
|
|
66
|
+
| Every Sunday at 6 PM | Weekly Sunday evening | `0 18 * * 0` |
|
|
67
|
+
| Multiple times daily | 8am, noon, 6pm | `0 8,12,18 * * *` |
|
|
68
|
+
|
|
69
|
+
### Examples
|
|
70
|
+
|
|
71
|
+
**Every day at 9 AM:**
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"expression": "0 9 * * *",
|
|
75
|
+
"timezone": "America/New_York"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Every 30 minutes:**
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"expression": "*/30 * * * *"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Weekdays at 6 PM:**
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"expression": "0 18 * * 1-5",
|
|
90
|
+
"timezone": "Europe/London"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Every Monday at 10 AM:**
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"expression": "0 10 * * 1",
|
|
98
|
+
"timezone": "Asia/Tokyo"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**First day of each month:**
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"expression": "0 0 1 * *"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Response Format
|
|
110
|
+
|
|
111
|
+
**Schedule created:**
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"success": true,
|
|
115
|
+
"message": "Cron schedule created",
|
|
116
|
+
"expression": "0 9 * * *",
|
|
117
|
+
"timezone": "America/New_York",
|
|
118
|
+
"next_run": "2025-01-31T09:00:00-05:00",
|
|
119
|
+
"description": "At 09:00 AM, every day"
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Schedule triggered:**
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"success": true,
|
|
127
|
+
"triggered": true,
|
|
128
|
+
"message": "Cron schedule triggered",
|
|
129
|
+
"expression": "0 9 * * *",
|
|
130
|
+
"triggered_at": "2025-01-30T09:00:00Z"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Error Response
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"error": "Invalid cron expression: too few fields"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Timezone Reference
|
|
143
|
+
|
|
144
|
+
| Timezone | Description |
|
|
145
|
+
|----------|-------------|
|
|
146
|
+
| `UTC` | Universal Time (default) |
|
|
147
|
+
| `America/New_York` | Eastern US |
|
|
148
|
+
| `America/Los_Angeles` | Pacific US |
|
|
149
|
+
| `Europe/London` | UK |
|
|
150
|
+
| `Europe/Paris` | Central Europe |
|
|
151
|
+
| `Asia/Tokyo` | Japan |
|
|
152
|
+
| `Asia/Shanghai` | China |
|
|
153
|
+
| `Australia/Sydney` | Australia Eastern |
|
|
154
|
+
|
|
155
|
+
## Use Cases
|
|
156
|
+
|
|
157
|
+
| Use Case | Expression | Description |
|
|
158
|
+
|----------|------------|-------------|
|
|
159
|
+
| Daily report | `0 9 * * *` | Generate daily reports |
|
|
160
|
+
| Hourly sync | `0 * * * *` | Sync data hourly |
|
|
161
|
+
| Weekly backup | `0 2 * * 0` | Sunday at 2 AM |
|
|
162
|
+
| Business hours check | `*/30 9-17 * * 1-5` | Every 30 min, 9-5 Mon-Fri |
|
|
163
|
+
| Monthly cleanup | `0 0 1 * *` | First of month |
|
|
164
|
+
|
|
165
|
+
## Common Workflows
|
|
166
|
+
|
|
167
|
+
### Daily notification
|
|
168
|
+
|
|
169
|
+
1. Set cron for desired time (e.g., `0 9 * * *`)
|
|
170
|
+
2. Cron triggers → workflow runs
|
|
171
|
+
3. Send notification to user
|
|
172
|
+
|
|
173
|
+
### Scheduled data sync
|
|
174
|
+
|
|
175
|
+
1. Set cron for sync interval (e.g., `0 * * * *`)
|
|
176
|
+
2. Cron triggers → fetch data
|
|
177
|
+
3. Process and store data
|
|
178
|
+
|
|
179
|
+
### Weekly report
|
|
180
|
+
|
|
181
|
+
1. Set cron for weekly (e.g., `0 10 * * 1`)
|
|
182
|
+
2. Cron triggers → generate report
|
|
183
|
+
3. Send report via email/WhatsApp
|
|
184
|
+
|
|
185
|
+
## Workflow-Based Scheduling
|
|
186
|
+
|
|
187
|
+
In this system, scheduling works through:
|
|
188
|
+
|
|
189
|
+
1. **Trigger Node**: Use Cron Scheduler as workflow start
|
|
190
|
+
2. **Deployment**: Deploy workflow to activate schedule
|
|
191
|
+
3. **Cancellation**: Undeploy workflow to stop schedule
|
|
192
|
+
|
|
193
|
+
Each trigger creates independent workflow runs.
|
|
194
|
+
|
|
195
|
+
## Best Practices
|
|
196
|
+
|
|
197
|
+
1. **Use UTC for global**: Avoid timezone confusion
|
|
198
|
+
2. **Consider load**: Don't schedule many jobs at :00
|
|
199
|
+
3. **Stagger jobs**: Use :05, :10 instead of all at :00
|
|
200
|
+
4. **Test expressions**: Verify with online cron tools
|
|
201
|
+
5. **Document schedules**: Keep track of what runs when
|
|
202
|
+
|
|
203
|
+
## Limitations
|
|
204
|
+
|
|
205
|
+
- Requires workflow deployment to activate
|
|
206
|
+
- Cannot schedule past events
|
|
207
|
+
- Minimum granularity is 1 minute
|
|
208
|
+
- Complex conditions need multiple schedules
|
|
209
|
+
|
|
210
|
+
## Setup Requirements
|
|
211
|
+
|
|
212
|
+
1. Connect the **Cron Scheduler** node to Zeenie's `input-tools` handle
|
|
213
|
+
2. Or use as workflow trigger (first node)
|
|
214
|
+
3. Deploy workflow to activate the schedule
|
|
215
|
+
4. Undeploy to cancel the schedule
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-manager-skill
|
|
3
|
+
description: Manage delegated tasks. List active tasks, check task status, get results from completed delegations, and mark tasks as done.
|
|
4
|
+
allowed-tools: task_manager
|
|
5
|
+
metadata:
|
|
6
|
+
author: machina
|
|
7
|
+
version: "1.0"
|
|
8
|
+
category: automation
|
|
9
|
+
icon: "📋"
|
|
10
|
+
color: "#F59E0B"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Task Manager Tool
|
|
14
|
+
|
|
15
|
+
Manage and track delegated agent tasks.
|
|
16
|
+
|
|
17
|
+
## How It Works
|
|
18
|
+
|
|
19
|
+
This skill provides instructions for the **Task Manager** tool node. Connect the **Task Manager** node to Zeenie's `input-tools` handle to enable task management operations.
|
|
20
|
+
|
|
21
|
+
## task_manager Tool
|
|
22
|
+
|
|
23
|
+
List, check, and manage delegated tasks.
|
|
24
|
+
|
|
25
|
+
### Schema Fields
|
|
26
|
+
|
|
27
|
+
| Field | Type | Required | Description |
|
|
28
|
+
|-------|------|----------|-------------|
|
|
29
|
+
| operation | string | Yes | `"list_tasks"`, `"get_task"`, or `"mark_done"` |
|
|
30
|
+
| task_id | string | For get_task, mark_done | Specific task ID to query |
|
|
31
|
+
| status_filter | string | No | Filter by status: `"running"`, `"completed"`, `"error"` |
|
|
32
|
+
|
|
33
|
+
### Operations
|
|
34
|
+
|
|
35
|
+
| Operation | Description | Required Fields |
|
|
36
|
+
|-----------|-------------|-----------------|
|
|
37
|
+
| `list_tasks` | List all tracked tasks | status_filter (optional) |
|
|
38
|
+
| `get_task` | Get details for specific task | task_id |
|
|
39
|
+
| `mark_done` | Remove task from tracking | task_id |
|
|
40
|
+
|
|
41
|
+
### Task States
|
|
42
|
+
|
|
43
|
+
| Status | Description |
|
|
44
|
+
|--------|-------------|
|
|
45
|
+
| `running` | Task is currently executing |
|
|
46
|
+
| `completed` | Task finished successfully |
|
|
47
|
+
| `error` | Task failed with error |
|
|
48
|
+
| `cancelled` | Task was cancelled |
|
|
49
|
+
|
|
50
|
+
### Examples
|
|
51
|
+
|
|
52
|
+
**List all tasks:**
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"operation": "list_tasks"
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**List only running tasks:**
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"operation": "list_tasks",
|
|
63
|
+
"status_filter": "running"
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**List completed tasks:**
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"operation": "list_tasks",
|
|
71
|
+
"status_filter": "completed"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Get specific task details:**
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"operation": "get_task",
|
|
79
|
+
"task_id": "delegated_agent_abc12345"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Mark task as done:**
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"operation": "mark_done",
|
|
87
|
+
"task_id": "delegated_agent_abc12345"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Response Formats
|
|
92
|
+
|
|
93
|
+
**list_tasks response:**
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"success": true,
|
|
97
|
+
"operation": "list_tasks",
|
|
98
|
+
"tasks": [
|
|
99
|
+
{
|
|
100
|
+
"task_id": "delegated_coding_agent_abc12345",
|
|
101
|
+
"status": "completed",
|
|
102
|
+
"agent_name": "Coding Agent",
|
|
103
|
+
"result_summary": "Generated Python function for data processing...",
|
|
104
|
+
"active": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"task_id": "delegated_web_agent_def67890",
|
|
108
|
+
"status": "running",
|
|
109
|
+
"active": true
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"count": 2,
|
|
113
|
+
"running": 1,
|
|
114
|
+
"completed": 1,
|
|
115
|
+
"errors": 0
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**get_task response (completed):**
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"success": true,
|
|
123
|
+
"operation": "get_task",
|
|
124
|
+
"task_id": "delegated_coding_agent_abc12345",
|
|
125
|
+
"status": "completed",
|
|
126
|
+
"agent_name": "Coding Agent",
|
|
127
|
+
"result": "Here is the Python function you requested:\n\ndef process_data(items):\n return [x * 2 for x in items]"
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**get_task response (running):**
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"success": true,
|
|
135
|
+
"operation": "get_task",
|
|
136
|
+
"task_id": "delegated_web_agent_def67890",
|
|
137
|
+
"status": "running",
|
|
138
|
+
"agent_name": "Web Agent"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**get_task response (error):**
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"success": true,
|
|
146
|
+
"operation": "get_task",
|
|
147
|
+
"task_id": "delegated_agent_xyz99999",
|
|
148
|
+
"status": "error",
|
|
149
|
+
"agent_name": "Social Agent",
|
|
150
|
+
"error": "Failed to connect to WhatsApp service"
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**mark_done response:**
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"success": true,
|
|
158
|
+
"operation": "mark_done",
|
|
159
|
+
"task_id": "delegated_coding_agent_abc12345",
|
|
160
|
+
"removed": true,
|
|
161
|
+
"message": "Task delegated_coding_agent_abc12345 marked as done and removed from tracking"
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Error Response
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"success": false,
|
|
170
|
+
"error": "task_id is required for get_task operation"
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"success": false,
|
|
177
|
+
"error": "Task delegated_agent_notfound not found",
|
|
178
|
+
"task_id": "delegated_agent_notfound"
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Use Cases
|
|
183
|
+
|
|
184
|
+
| Use Case | Operation | Description |
|
|
185
|
+
|----------|-----------|-------------|
|
|
186
|
+
| Monitor progress | list_tasks | See all active delegations |
|
|
187
|
+
| Check result | get_task | Get completed task output |
|
|
188
|
+
| Verify completion | get_task | Confirm task finished |
|
|
189
|
+
| Clean up | mark_done | Remove processed tasks |
|
|
190
|
+
| Error handling | list_tasks + filter | Find failed tasks |
|
|
191
|
+
|
|
192
|
+
## Common Workflows
|
|
193
|
+
|
|
194
|
+
### Check on delegated work
|
|
195
|
+
|
|
196
|
+
1. Delegate task to sub-agent
|
|
197
|
+
2. Wait or continue with other work
|
|
198
|
+
3. Use `list_tasks` to see status
|
|
199
|
+
4. Use `get_task` to retrieve result
|
|
200
|
+
|
|
201
|
+
### Process all completed tasks
|
|
202
|
+
|
|
203
|
+
1. Use `list_tasks` with `status_filter: "completed"`
|
|
204
|
+
2. For each task, use `get_task` to get full result
|
|
205
|
+
3. Process the results
|
|
206
|
+
4. Use `mark_done` to clean up
|
|
207
|
+
|
|
208
|
+
### Handle errors
|
|
209
|
+
|
|
210
|
+
1. Use `list_tasks` with `status_filter: "error"`
|
|
211
|
+
2. Review failed tasks
|
|
212
|
+
3. Decide to retry or mark_done
|
|
213
|
+
4. Optionally re-delegate failed work
|
|
214
|
+
|
|
215
|
+
## Integration with Agent Delegation
|
|
216
|
+
|
|
217
|
+
When a parent agent delegates work:
|
|
218
|
+
|
|
219
|
+
1. `delegate_to_<agent>` tool returns `task_id`
|
|
220
|
+
2. Child agent runs in background
|
|
221
|
+
3. Parent can check status with `task_manager`
|
|
222
|
+
4. Results persist until `mark_done`
|
|
223
|
+
|
|
224
|
+
### Task ID Format
|
|
225
|
+
|
|
226
|
+
Task IDs follow the pattern:
|
|
227
|
+
```
|
|
228
|
+
delegated_<node_id>_<random_hex>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Example: `delegated_coding_agent_1_abc12345`
|
|
232
|
+
|
|
233
|
+
## Best Practices
|
|
234
|
+
|
|
235
|
+
1. **Track task IDs**: Store returned task_ids for later reference
|
|
236
|
+
2. **Poll appropriately**: Don't check too frequently
|
|
237
|
+
3. **Handle all states**: Account for running, completed, and error
|
|
238
|
+
4. **Clean up**: Use mark_done after processing results
|
|
239
|
+
5. **Check errors**: Review failed tasks before marking done
|
|
240
|
+
|
|
241
|
+
## Limitations
|
|
242
|
+
|
|
243
|
+
- Tasks not persistent across server restarts (in-memory)
|
|
244
|
+
- Results may be truncated if very large (4000 char limit in responses)
|
|
245
|
+
- Cannot cancel running tasks (only track status)
|
|
246
|
+
|
|
247
|
+
## Setup Requirements
|
|
248
|
+
|
|
249
|
+
1. Connect the **Task Manager** node to Zeenie's `input-tools` handle
|
|
250
|
+
2. Works with any agent that uses delegation
|
|
251
|
+
3. Task IDs are returned when delegating to sub-agents
|