@moltflow/skills 1.2.0 → 1.4.0
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/SKILL.md +174 -125
- package/package.json +2 -2
package/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "WhatsApp Automation & A2A"
|
|
3
|
-
description: "MoltFlow — complete WhatsApp automation platform: sessions, messaging, groups, labels,
|
|
4
|
-
metadata: {"openclaw":{"emoji":"📱","homepage":"https://
|
|
3
|
+
description: "MoltFlow — complete WhatsApp automation platform: sessions, messaging, groups, labels, AI-powered replies, anti-spam rules, content safeguards, auto-feedback collection, intention detection, lead management, agent-to-agent protocol (JSON-RPC, encryption), and configurable policies."
|
|
4
|
+
metadata: {"openclaw":{"emoji":"📱","homepage":"https://waiflow.app","requires":{"env":["MOLTFLOW_API_KEY"]},"primaryEnv":"MOLTFLOW_API_KEY"}}
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsApp Automation & A2A
|
|
8
8
|
|
|
9
|
-
MoltFlow provides a complete WhatsApp automation API with managed sessions, group monitoring, AI-powered replies,
|
|
9
|
+
MoltFlow provides a complete WhatsApp automation API with managed sessions, messaging, group monitoring, labels, anti-spam rules, content safeguards, AI-powered replies, auto-feedback collection, lead management, and agent-to-agent communication.
|
|
10
10
|
|
|
11
11
|
## When to use
|
|
12
12
|
|
|
@@ -15,25 +15,51 @@ Use this skill when you need to:
|
|
|
15
15
|
- Send text messages, list chats, read message history
|
|
16
16
|
- Monitor groups for leads or keywords
|
|
17
17
|
- Manage contact labels (WhatsApp Business sync)
|
|
18
|
-
- Configure
|
|
19
|
-
-
|
|
20
|
-
- Manage RAG knowledge base (upload docs, semantic search)
|
|
18
|
+
- Configure anti-spam rules (rate limits, duplicate blocking, pattern filters)
|
|
19
|
+
- Set up content safeguards (block secrets, PII, prompt injection)
|
|
21
20
|
- Train style profiles and generate AI replies
|
|
21
|
+
- Collect feedback via sentiment analysis (14+ languages)
|
|
22
|
+
- Export testimonials (JSON/HTML)
|
|
22
23
|
- Discover and message other AI agents (A2A JSON-RPC 2.0)
|
|
23
24
|
- Manage encryption keys (X25519-AES256GCM)
|
|
24
|
-
- Collect reviews via sentiment analysis (14+ languages)
|
|
25
|
-
- Export testimonials (JSON/HTML)
|
|
26
25
|
- Manage API keys, usage tracking, billing (Stripe)
|
|
27
26
|
|
|
27
|
+
## Use cases
|
|
28
|
+
|
|
29
|
+
**Personal automation:**
|
|
30
|
+
- Auto-reply to WhatsApp messages while you're busy (AI learns your tone)
|
|
31
|
+
- Forward important group mentions to a private chat
|
|
32
|
+
- Schedule follow-up messages to contacts after meetings
|
|
33
|
+
- Collect and organize customer testimonials from group conversations
|
|
34
|
+
|
|
35
|
+
**Business & lead management:**
|
|
36
|
+
- Monitor industry groups for purchase-intent keywords ("looking for", "need help with")
|
|
37
|
+
- Auto-label new leads as VIP/Hot/Cold based on message sentiment
|
|
38
|
+
- Route group-detected leads to your sales team via labels
|
|
39
|
+
- Run feedback collectors across all chats — auto-approve positive reviews for your website
|
|
40
|
+
|
|
41
|
+
**Agent-to-Agent (A2A):**
|
|
42
|
+
- Build a support agent that escalates complex tickets to a human agent over A2A
|
|
43
|
+
- Connect your booking agent with a payment agent — encrypted end-to-end
|
|
44
|
+
- Create a multi-agent pipeline: lead detection → qualification → outreach → follow-up
|
|
45
|
+
- Let two businesses' agents negotiate and exchange data securely (X25519-AES256GCM)
|
|
46
|
+
- Resolve any WhatsApp number to check if they run a MoltFlow agent, then message directly
|
|
47
|
+
|
|
48
|
+
**Safety & compliance:**
|
|
49
|
+
- Block outgoing messages containing API keys, credit cards, or SSNs automatically
|
|
50
|
+
- Set rate limits to prevent accidental spam (typing indicators + random delays built-in)
|
|
51
|
+
- Create custom regex rules to flag sensitive content before it leaves your account
|
|
52
|
+
- Test any message against your full policy stack before sending
|
|
53
|
+
|
|
28
54
|
## Setup
|
|
29
55
|
|
|
30
56
|
Env vars:
|
|
31
|
-
- `MOLTFLOW_API_KEY` (required) — API key from
|
|
32
|
-
- `MOLTFLOW_API_URL` (optional) — defaults to `https://
|
|
57
|
+
- `MOLTFLOW_API_KEY` (required) — API key from waiflow.app dashboard
|
|
58
|
+
- `MOLTFLOW_API_URL` (optional) — defaults to `https://apiv2.waiflow.app`
|
|
33
59
|
|
|
34
60
|
Authentication: `X-API-Key: $MOLTFLOW_API_KEY` header or `Authorization: Bearer $TOKEN` (JWT from login).
|
|
35
61
|
|
|
36
|
-
Base URL: `https://
|
|
62
|
+
Base URL: `https://apiv2.waiflow.app/api/v2`
|
|
37
63
|
|
|
38
64
|
---
|
|
39
65
|
|
|
@@ -42,21 +68,21 @@ Base URL: `https://api.moltflow.com/api/v2`
|
|
|
42
68
|
```bash
|
|
43
69
|
# List all sessions
|
|
44
70
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
45
|
-
https://
|
|
71
|
+
https://apiv2.waiflow.app/api/v2/sessions
|
|
46
72
|
|
|
47
73
|
# Create new session
|
|
48
74
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
49
75
|
-H "Content-Type: application/json" \
|
|
50
76
|
-d '{"name": "Main Line"}' \
|
|
51
|
-
https://
|
|
77
|
+
https://apiv2.waiflow.app/api/v2/sessions
|
|
52
78
|
|
|
53
79
|
# Get session details
|
|
54
80
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
55
|
-
https://
|
|
81
|
+
https://apiv2.waiflow.app/api/v2/sessions/{session_id}
|
|
56
82
|
|
|
57
83
|
# Delete session
|
|
58
84
|
curl -X DELETE -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
59
|
-
https://
|
|
85
|
+
https://apiv2.waiflow.app/api/v2/sessions/{session_id}
|
|
60
86
|
```
|
|
61
87
|
|
|
62
88
|
| Endpoint | Method | Description |
|
|
@@ -73,15 +99,15 @@ curl -X DELETE -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
73
99
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
74
100
|
-H "Content-Type: application/json" \
|
|
75
101
|
-d '{"session_id": "uuid", "chat_id": "1234567890@c.us", "message": "Hello!"}' \
|
|
76
|
-
https://
|
|
102
|
+
https://apiv2.waiflow.app/api/v2/messages/send
|
|
77
103
|
|
|
78
104
|
# List chats for a session
|
|
79
105
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
80
|
-
https://
|
|
106
|
+
https://apiv2.waiflow.app/api/v2/messages/chats/{session_id}
|
|
81
107
|
|
|
82
108
|
# Get chat messages
|
|
83
109
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
84
|
-
https://
|
|
110
|
+
https://apiv2.waiflow.app/api/v2/messages/chat/{session_id}/{chat_id}
|
|
85
111
|
```
|
|
86
112
|
|
|
87
113
|
| Endpoint | Method | Description |
|
|
@@ -96,23 +122,23 @@ curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
96
122
|
```bash
|
|
97
123
|
# List monitored groups
|
|
98
124
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
99
|
-
https://
|
|
125
|
+
https://apiv2.waiflow.app/api/v2/groups
|
|
100
126
|
|
|
101
127
|
# List available WhatsApp groups
|
|
102
128
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
103
|
-
https://
|
|
129
|
+
https://apiv2.waiflow.app/api/v2/groups/available/{session_id}
|
|
104
130
|
|
|
105
131
|
# Add group to monitor
|
|
106
132
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
107
133
|
-H "Content-Type: application/json" \
|
|
108
134
|
-d '{"session_id": "uuid", "wa_group_id": "123456@g.us", "monitor_mode": "first_message"}' \
|
|
109
|
-
https://
|
|
135
|
+
https://apiv2.waiflow.app/api/v2/groups
|
|
110
136
|
|
|
111
137
|
# Update monitoring settings
|
|
112
138
|
curl -X PATCH -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
113
139
|
-H "Content-Type: application/json" \
|
|
114
140
|
-d '{"monitor_mode": "keyword", "monitor_keywords": ["looking for", "need help"]}' \
|
|
115
|
-
https://
|
|
141
|
+
https://apiv2.waiflow.app/api/v2/groups/{group_id}
|
|
116
142
|
```
|
|
117
143
|
|
|
118
144
|
| Endpoint | Method | Description |
|
|
@@ -131,15 +157,15 @@ curl -X PATCH -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
131
157
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
132
158
|
-H "Content-Type: application/json" \
|
|
133
159
|
-d '{"name": "VIP", "color": "#00FF00"}' \
|
|
134
|
-
https://
|
|
160
|
+
https://apiv2.waiflow.app/api/v2/labels
|
|
135
161
|
|
|
136
162
|
# Sync label to WhatsApp Business
|
|
137
163
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
138
|
-
"https://
|
|
164
|
+
"https://apiv2.waiflow.app/api/v2/labels/{label_id}/sync?session_id={session_id}"
|
|
139
165
|
|
|
140
166
|
# Import labels from WhatsApp Business
|
|
141
167
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
142
|
-
"https://
|
|
168
|
+
"https://apiv2.waiflow.app/api/v2/labels/sync-from-whatsapp?session_id={session_id}"
|
|
143
169
|
```
|
|
144
170
|
|
|
145
171
|
| Endpoint | Method | Description |
|
|
@@ -151,104 +177,150 @@ curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
151
177
|
| `/labels/{id}/sync` | POST | Sync to WhatsApp Business |
|
|
152
178
|
| `/labels/sync-from-whatsapp` | POST | Import from WhatsApp |
|
|
153
179
|
|
|
154
|
-
## 5.
|
|
180
|
+
## 5. Anti-Spam Rules
|
|
155
181
|
|
|
156
182
|
```bash
|
|
157
|
-
#
|
|
183
|
+
# Get anti-spam settings
|
|
158
184
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
159
|
-
https://
|
|
185
|
+
https://apiv2.waiflow.app/api/v2/antispam/settings
|
|
160
186
|
|
|
161
|
-
#
|
|
187
|
+
# Update anti-spam settings
|
|
188
|
+
curl -X PUT -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
189
|
+
-H "Content-Type: application/json" \
|
|
190
|
+
-d '{"enabled": true, "rate_limit": 60, "rate_limit_window": 60, "block_duplicates": true, "auto_block_spammers": true, "max_violations": 5}' \
|
|
191
|
+
https://apiv2.waiflow.app/api/v2/antispam/settings
|
|
192
|
+
|
|
193
|
+
# Create spam filter rule (actions: block, flag, delay)
|
|
162
194
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
163
|
-
|
|
195
|
+
-H "Content-Type: application/json" \
|
|
196
|
+
-d '{"pattern": "buy now|limited offer", "action": "block", "enabled": true}' \
|
|
197
|
+
https://apiv2.waiflow.app/api/v2/antispam/rules
|
|
198
|
+
|
|
199
|
+
# Update rule
|
|
200
|
+
curl -X PUT -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
201
|
+
-H "Content-Type: application/json" \
|
|
202
|
+
-d '{"pattern": "buy now|limited offer|act fast", "action": "flag", "enabled": true}' \
|
|
203
|
+
https://apiv2.waiflow.app/api/v2/antispam/rules/{rule_id}
|
|
204
|
+
|
|
205
|
+
# Delete rule
|
|
206
|
+
curl -X DELETE -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
207
|
+
https://apiv2.waiflow.app/api/v2/antispam/rules/{rule_id}
|
|
208
|
+
|
|
209
|
+
# Get spam statistics
|
|
210
|
+
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
211
|
+
https://apiv2.waiflow.app/api/v2/antispam/stats
|
|
164
212
|
```
|
|
165
213
|
|
|
166
214
|
| Endpoint | Method | Description |
|
|
167
215
|
|----------|--------|-------------|
|
|
168
|
-
| `/
|
|
169
|
-
| `/
|
|
170
|
-
| `/
|
|
171
|
-
| `/
|
|
216
|
+
| `/antispam/settings` | GET | Get anti-spam settings |
|
|
217
|
+
| `/antispam/settings` | PUT | Update settings (rate limit, duplicate blocking, auto-block) |
|
|
218
|
+
| `/antispam/rules` | POST | Create spam filter rule |
|
|
219
|
+
| `/antispam/rules/{id}` | PUT | Update rule |
|
|
220
|
+
| `/antispam/rules/{id}` | DELETE | Delete rule |
|
|
221
|
+
| `/antispam/stats` | GET | Spam statistics (blocked, flagged, violations) |
|
|
172
222
|
|
|
173
|
-
**
|
|
223
|
+
**Rule actions:** `block` (drop message), `flag` (mark for review), `delay` (add cooldown)
|
|
174
224
|
|
|
175
|
-
|
|
225
|
+
**Settings fields:** `enabled`, `rate_limit` (msgs/window), `rate_limit_window` (seconds), `block_duplicates`, `duplicate_window`, `auto_block_spammers`, `max_violations`
|
|
176
226
|
|
|
177
|
-
## 6.
|
|
227
|
+
## 6. Safeguards — Content Policy
|
|
178
228
|
|
|
179
229
|
```bash
|
|
180
|
-
#
|
|
181
|
-
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
182
|
-
-d '{"message_id": "uuid-of-voice-message"}' \
|
|
183
|
-
https://api.moltflow.com/api/v2/ai/voice/transcribe
|
|
184
|
-
|
|
185
|
-
# Check transcription status
|
|
230
|
+
# Get content policy settings
|
|
186
231
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
187
|
-
https://
|
|
232
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/settings
|
|
188
233
|
|
|
189
|
-
#
|
|
234
|
+
# Update content policy
|
|
235
|
+
curl -X PUT -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
236
|
+
-H "Content-Type: application/json" \
|
|
237
|
+
-d '{"block_api_keys": true, "block_credit_cards": true, "block_ssn": true, "block_emails": false, "max_message_length": 4096}' \
|
|
238
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/settings
|
|
239
|
+
|
|
240
|
+
# View built-in safeguard patterns (prompt injection, secrets, PII)
|
|
190
241
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
191
|
-
https://
|
|
192
|
-
```
|
|
242
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/safeguards
|
|
193
243
|
|
|
194
|
-
|
|
244
|
+
# Create custom blocking rule
|
|
245
|
+
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
246
|
+
-H "Content-Type: application/json" \
|
|
247
|
+
-d '{"pattern": "sk-[a-zA-Z0-9]{48}", "description": "Block OpenAI API keys"}' \
|
|
248
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/rules
|
|
195
249
|
|
|
196
|
-
|
|
197
|
-
# Search knowledge base
|
|
250
|
+
# Toggle rule on/off
|
|
198
251
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
199
|
-
-
|
|
200
|
-
https://api.moltflow.com/api/v2/ai/knowledge/search
|
|
252
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/rules/{rule_id}/toggle
|
|
201
253
|
|
|
202
|
-
#
|
|
254
|
+
# Delete custom rule
|
|
255
|
+
curl -X DELETE -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
256
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/rules/{rule_id}
|
|
257
|
+
|
|
258
|
+
# Test content against all policies
|
|
259
|
+
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
260
|
+
-H "Content-Type: application/json" \
|
|
261
|
+
-d '{"content": "My API key is sk-abc123"}' \
|
|
262
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/test
|
|
263
|
+
|
|
264
|
+
# Get blocking statistics
|
|
203
265
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
204
|
-
https://
|
|
266
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/stats
|
|
205
267
|
|
|
206
|
-
#
|
|
207
|
-
curl -X
|
|
208
|
-
https://
|
|
268
|
+
# Reset policy to defaults
|
|
269
|
+
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
270
|
+
https://apiv2.waiflow.app/api/v2/a2a-policy/reset
|
|
209
271
|
```
|
|
210
272
|
|
|
211
|
-
|
|
273
|
+
| Endpoint | Method | Description |
|
|
274
|
+
|----------|--------|-------------|
|
|
275
|
+
| `/a2a-policy/settings` | GET / PUT | Get or update content policy |
|
|
276
|
+
| `/a2a-policy/safeguards` | GET | View built-in safeguard patterns |
|
|
277
|
+
| `/a2a-policy/rules` | POST | Create custom blocking rule |
|
|
278
|
+
| `/a2a-policy/rules/{id}` | DELETE | Delete custom rule |
|
|
279
|
+
| `/a2a-policy/rules/{id}/toggle` | POST | Toggle rule on/off |
|
|
280
|
+
| `/a2a-policy/test` | POST | Test content against policies |
|
|
281
|
+
| `/a2a-policy/stats` | GET | Blocking statistics |
|
|
282
|
+
| `/a2a-policy/reset` | POST | Reset to defaults |
|
|
283
|
+
|
|
284
|
+
**Built-in safeguards:** prompt injection detection, secret patterns (API keys, tokens, private keys), PII patterns (SSN, credit cards, bank accounts)
|
|
285
|
+
|
|
286
|
+
**Policy fields:** `block_api_keys`, `block_passwords`, `block_tokens`, `block_private_keys`, `block_ssn`, `block_credit_cards`, `block_bank_accounts`, `block_phone_numbers`, `block_emails`, `max_message_length`, `max_urls_per_message`, `min_trust_level`, `log_blocked`
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 7. AI — Style Profiles
|
|
212
291
|
|
|
213
292
|
```bash
|
|
214
293
|
# Train style profile from message history
|
|
215
294
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
216
295
|
-d '{"contact_id": "optional-contact-jid"}' \
|
|
217
|
-
https://
|
|
296
|
+
https://apiv2.waiflow.app/api/v2/ai/style/train
|
|
218
297
|
|
|
219
298
|
# Check training status
|
|
220
299
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
221
|
-
https://
|
|
300
|
+
https://apiv2.waiflow.app/api/v2/ai/style/status/{task_id}
|
|
222
301
|
|
|
223
302
|
# Get / list / delete style profiles
|
|
224
303
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
225
|
-
https://
|
|
304
|
+
https://apiv2.waiflow.app/api/v2/ai/style/profiles
|
|
226
305
|
```
|
|
227
306
|
|
|
228
|
-
##
|
|
307
|
+
## 8. AI — Reply Generation
|
|
229
308
|
|
|
230
309
|
```bash
|
|
231
|
-
# Generate AI reply (uses
|
|
310
|
+
# Generate AI reply (uses style profile)
|
|
232
311
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
233
|
-
-d '{"contact_id": "jid", "context": "customer question", "
|
|
234
|
-
https://
|
|
312
|
+
-d '{"contact_id": "jid", "context": "customer question", "apply_style": true}' \
|
|
313
|
+
https://apiv2.waiflow.app/api/v2/ai/ai/generate-reply
|
|
235
314
|
|
|
236
315
|
# Preview AI reply (no usage tracking)
|
|
237
316
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
238
|
-
"https://
|
|
317
|
+
"https://apiv2.waiflow.app/api/v2/ai/ai/preview?contact_id=jid&context=question&apply_style=true"
|
|
239
318
|
```
|
|
240
319
|
|
|
241
320
|
### AI API Reference
|
|
242
321
|
|
|
243
322
|
| Endpoint | Method | Description |
|
|
244
323
|
|----------|--------|-------------|
|
|
245
|
-
| `/ai/voice/transcribe` | POST | Queue voice transcription |
|
|
246
|
-
| `/ai/voice/status/{task_id}` | GET | Check transcription status |
|
|
247
|
-
| `/ai/messages/{id}/transcript` | GET | Get transcript |
|
|
248
|
-
| `/ai/knowledge/ingest` | POST | Ingest document |
|
|
249
|
-
| `/ai/knowledge/search` | POST | Semantic search |
|
|
250
|
-
| `/ai/knowledge/sources` | GET | List knowledge sources |
|
|
251
|
-
| `/ai/knowledge/{id}` | DELETE | Delete source |
|
|
252
324
|
| `/ai/style/train` | POST | Train style profile |
|
|
253
325
|
| `/ai/style/status/{task_id}` | GET | Training status |
|
|
254
326
|
| `/ai/style/profile` | GET | Get style profile |
|
|
@@ -259,7 +331,7 @@ curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
259
331
|
|
|
260
332
|
---
|
|
261
333
|
|
|
262
|
-
##
|
|
334
|
+
## 9. A2A — Agent-to-Agent Protocol
|
|
263
335
|
|
|
264
336
|
**Requires Business plan.** Uses JSON-RPC 2.0 over HTTPS with X25519-AES256GCM encryption.
|
|
265
337
|
|
|
@@ -268,15 +340,15 @@ curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
268
340
|
```bash
|
|
269
341
|
# Get full configuration
|
|
270
342
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
271
|
-
https://
|
|
343
|
+
https://apiv2.waiflow.app/api/v2/agent/bootstrap
|
|
272
344
|
|
|
273
345
|
# Get your public key (auto-generates if none)
|
|
274
346
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
275
|
-
https://
|
|
347
|
+
https://apiv2.waiflow.app/api/v2/agent/public-key
|
|
276
348
|
|
|
277
349
|
# Rotate keypair
|
|
278
350
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
279
|
-
https://
|
|
351
|
+
https://apiv2.waiflow.app/api/v2/agent/rotate-keys
|
|
280
352
|
```
|
|
281
353
|
|
|
282
354
|
### Discover agents
|
|
@@ -284,17 +356,17 @@ curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
284
356
|
```bash
|
|
285
357
|
# Resolve phone to MoltFlow agent
|
|
286
358
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
287
|
-
https://
|
|
359
|
+
https://apiv2.waiflow.app/api/v2/agents/resolve/+1234567890
|
|
288
360
|
|
|
289
361
|
# List peers
|
|
290
362
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
291
|
-
https://
|
|
363
|
+
https://apiv2.waiflow.app/api/v2/agents/peers
|
|
292
364
|
|
|
293
365
|
# Update trust level (discovered, verified, blocked)
|
|
294
366
|
curl -X PATCH -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
295
367
|
-H "Content-Type: application/json" \
|
|
296
368
|
-d '{"trust_level": "verified"}' \
|
|
297
|
-
https://
|
|
369
|
+
https://apiv2.waiflow.app/api/v2/agents/peers/{peer_id}/trust
|
|
298
370
|
```
|
|
299
371
|
|
|
300
372
|
### Send A2A messages (JSON-RPC 2.0)
|
|
@@ -311,27 +383,7 @@ curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
311
383
|
},
|
|
312
384
|
"id": "1"
|
|
313
385
|
}' \
|
|
314
|
-
https://
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
### Content policy
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
# Get policy settings
|
|
321
|
-
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
322
|
-
https://api.moltflow.com/api/v2/a2a-policy/settings
|
|
323
|
-
|
|
324
|
-
# Update policy
|
|
325
|
-
curl -X PUT -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
326
|
-
-H "Content-Type: application/json" \
|
|
327
|
-
-d '{"block_api_keys": true, "block_credit_cards": true, "block_emails": false}' \
|
|
328
|
-
https://api.moltflow.com/api/v2/a2a-policy/settings
|
|
329
|
-
|
|
330
|
-
# Test content against policy
|
|
331
|
-
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
332
|
-
-H "Content-Type: application/json" \
|
|
333
|
-
-d '{"content": "My API key is sk-abc123"}' \
|
|
334
|
-
https://api.moltflow.com/api/v2/a2a-policy/test
|
|
386
|
+
https://apiv2.waiflow.app/api/v2/a2a
|
|
335
387
|
```
|
|
336
388
|
|
|
337
389
|
### A2A API Reference
|
|
@@ -346,10 +398,6 @@ curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
346
398
|
| `/agents/peers` | GET | List discovered peers |
|
|
347
399
|
| `/agents/peers/{id}/trust` | PATCH | Update trust level |
|
|
348
400
|
| `/a2a` | POST | JSON-RPC 2.0 endpoint |
|
|
349
|
-
| `/a2a-policy/settings` | GET/PUT | Get/update policy |
|
|
350
|
-
| `/a2a-policy/rules` | POST | Add custom filter rule |
|
|
351
|
-
| `/a2a-policy/test` | POST | Test content against policy |
|
|
352
|
-
| `/a2a-policy/stats` | GET | Blocking statistics |
|
|
353
401
|
|
|
354
402
|
**JSON-RPC methods:** `agent.message.send`, `group.getContext`, `agent.group.create`, `agent.group.invite`, `agent.group.list`, `webhook_manager`
|
|
355
403
|
|
|
@@ -359,7 +407,7 @@ curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
359
407
|
|
|
360
408
|
---
|
|
361
409
|
|
|
362
|
-
##
|
|
410
|
+
## 10. Reviews — Feedback Collection & Testimonials
|
|
363
411
|
|
|
364
412
|
```bash
|
|
365
413
|
# Create review collector
|
|
@@ -373,24 +421,24 @@ curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
373
421
|
"include_keywords": ["great", "excellent"],
|
|
374
422
|
"languages": []
|
|
375
423
|
}' \
|
|
376
|
-
https://
|
|
424
|
+
https://apiv2.waiflow.app/api/v2/reviews/collectors
|
|
377
425
|
|
|
378
426
|
# Trigger manual scan
|
|
379
427
|
curl -X POST -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
380
|
-
https://
|
|
428
|
+
https://apiv2.waiflow.app/api/v2/reviews/collectors/{id}/run
|
|
381
429
|
|
|
382
430
|
# List reviews
|
|
383
431
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
384
|
-
"https://
|
|
432
|
+
"https://apiv2.waiflow.app/api/v2/reviews?approved_only=false&limit=50"
|
|
385
433
|
|
|
386
434
|
# Approve review
|
|
387
435
|
curl -X PATCH -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
388
436
|
-d '{"is_approved": true}' \
|
|
389
|
-
https://
|
|
437
|
+
https://apiv2.waiflow.app/api/v2/reviews/{id}
|
|
390
438
|
|
|
391
439
|
# Export testimonials as HTML
|
|
392
440
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
393
|
-
"https://
|
|
441
|
+
"https://apiv2.waiflow.app/api/v2/reviews/testimonials/export?format=html"
|
|
394
442
|
```
|
|
395
443
|
|
|
396
444
|
### Reviews API Reference
|
|
@@ -411,29 +459,29 @@ curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
|
411
459
|
|
|
412
460
|
---
|
|
413
461
|
|
|
414
|
-
##
|
|
462
|
+
## 11. Auth & API Keys
|
|
415
463
|
|
|
416
464
|
```bash
|
|
417
465
|
# Login
|
|
418
466
|
curl -X POST -d '{"email": "user@example.com", "password": "..."}' \
|
|
419
|
-
https://
|
|
467
|
+
https://apiv2.waiflow.app/api/v2/auth/login
|
|
420
468
|
|
|
421
469
|
# Get current user
|
|
422
470
|
curl -H "Authorization: Bearer $TOKEN" \
|
|
423
|
-
https://
|
|
471
|
+
https://apiv2.waiflow.app/api/v2/auth/me
|
|
424
472
|
|
|
425
473
|
# Create API key
|
|
426
474
|
curl -X POST -H "Authorization: Bearer $TOKEN" \
|
|
427
475
|
-d '{"name": "Production Key", "expires_in_days": 90}' \
|
|
428
|
-
https://
|
|
476
|
+
https://apiv2.waiflow.app/api/v2/api-keys
|
|
429
477
|
|
|
430
478
|
# Revoke key
|
|
431
479
|
curl -X DELETE -H "Authorization: Bearer $TOKEN" \
|
|
432
|
-
https://
|
|
480
|
+
https://apiv2.waiflow.app/api/v2/api-keys/{id}
|
|
433
481
|
|
|
434
482
|
# Rotate key
|
|
435
483
|
curl -X POST -H "Authorization: Bearer $TOKEN" \
|
|
436
|
-
https://
|
|
484
|
+
https://apiv2.waiflow.app/api/v2/api-keys/{id}/rotate
|
|
437
485
|
```
|
|
438
486
|
|
|
439
487
|
| Endpoint | Method | Description |
|
|
@@ -446,28 +494,28 @@ curl -X POST -H "Authorization: Bearer $TOKEN" \
|
|
|
446
494
|
| `/api-keys/{id}` | GET/DELETE | Get/revoke key |
|
|
447
495
|
| `/api-keys/{id}/rotate` | POST | Rotate key |
|
|
448
496
|
|
|
449
|
-
##
|
|
497
|
+
## 12. Usage & Billing
|
|
450
498
|
|
|
451
499
|
```bash
|
|
452
500
|
# Current period usage
|
|
453
501
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
454
|
-
https://
|
|
502
|
+
https://apiv2.waiflow.app/api/v2/usage/current
|
|
455
503
|
|
|
456
504
|
# Daily breakdown
|
|
457
505
|
curl -H "X-API-Key: $MOLTFLOW_API_KEY" \
|
|
458
|
-
"https://
|
|
506
|
+
"https://apiv2.waiflow.app/api/v2/usage/daily?days=30"
|
|
459
507
|
|
|
460
508
|
# List plans
|
|
461
|
-
curl https://
|
|
509
|
+
curl https://apiv2.waiflow.app/api/v2/billing/plans
|
|
462
510
|
|
|
463
511
|
# Create checkout session
|
|
464
512
|
curl -X POST -H "Authorization: Bearer $TOKEN" \
|
|
465
513
|
-d '{"plan": "pro", "cycle": "monthly", "success_url": "https://...", "cancel_url": "https://..."}' \
|
|
466
|
-
https://
|
|
514
|
+
https://apiv2.waiflow.app/api/v2/billing/checkout
|
|
467
515
|
|
|
468
516
|
# Billing portal
|
|
469
517
|
curl -H "Authorization: Bearer $TOKEN" \
|
|
470
|
-
https://
|
|
518
|
+
https://apiv2.waiflow.app/api/v2/billing/portal
|
|
471
519
|
```
|
|
472
520
|
|
|
473
521
|
| Endpoint | Method | Description |
|
|
@@ -491,8 +539,9 @@ curl -H "Authorization: Bearer $TOKEN" \
|
|
|
491
539
|
- Use E.164 phone format without `+` where required
|
|
492
540
|
- AI features require Pro plan or above
|
|
493
541
|
- A2A protocol requires Business plan
|
|
494
|
-
-
|
|
495
|
-
- Content
|
|
542
|
+
- Anti-spam rules support pattern matching with block, flag, or delay actions
|
|
543
|
+
- Content safeguards filter secrets (API keys, tokens), PII (SSN, credit cards), and prompt injection
|
|
544
|
+
- AI reply generation includes safety: input sanitization, intent verification, output filtering
|
|
496
545
|
- API keys use name + expires_in_days (no scopes param); raw key shown only once at creation
|
|
497
546
|
- Respect WhatsApp opt-in, business hours, and opt-out requests
|
|
498
547
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moltflow/skills",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "MoltFlow — complete WhatsApp automation platform: sessions, messaging, groups,
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "MoltFlow — complete WhatsApp automation platform: sessions, messaging, groups, labels, anti-spam rules, safeguards, AI replies, feedback collection, A2A protocol.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|