wagent 1.0.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/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # wagent
2
+
3
+ Programmable WhatsApp AI agent that runs from your terminal.
4
+
5
+ It pairs with WhatsApp first, then asks for an AI provider/API key, then bootstraps itself by messaging you for identity, purpose, vibe, and permissions.
6
+
7
+ ## Install / Run
8
+
9
+ ```bash
10
+ npx wagent
11
+ ```
12
+
13
+ Or install globally:
14
+
15
+ ```bash
16
+ npm i -g wagent
17
+ wagent
18
+ ```
19
+
20
+ From source:
21
+
22
+ ```bash
23
+ pnpm install
24
+ pnpm build
25
+ pnpm wagent
26
+ ```
27
+
28
+ ## First Run Flow
29
+
30
+ 1. Pair WhatsApp by scanning the QR code.
31
+ 2. Choose an AI provider.
32
+ 3. Enter API key.
33
+ 4. The agent messages you to configure its identity and permissions.
34
+ 5. It drafts a system prompt and asks for confirmation.
35
+ 6. After confirmation, it compacts setup context and follows the saved prompt.
36
+
37
+ ## Providers
38
+
39
+ Setup wizard options:
40
+
41
+ 1. Gemini + Web Search (recommended)
42
+ 2. Groq
43
+ 3. Other OpenAI-compatible endpoint
44
+
45
+ Config is stored locally, not in `.env`:
46
+
47
+ - Linux/macOS: `~/.config/wagent/config.json`
48
+ - Windows: `%APPDATA%/wagent/config.json`
49
+
50
+ The WhatsApp SQLite session is stored in the same config directory as `wagent.db`.
51
+
52
+ Environment variables still work for advanced use:
53
+
54
+ ```bash
55
+ GROQ_API_KEY=...
56
+ GROQ_BASE_URL=https://api.groq.com/openai/v1
57
+ GROQ_MODEL=openai/gpt-oss-120b
58
+ ```
59
+
60
+ ## Commands
61
+
62
+ ```bash
63
+ wagent # start agent
64
+ wagent start # start agent
65
+ wagent setup # re-run provider/API-key setup after WhatsApp pairing
66
+ wagent config # show config path/provider/model
67
+ wagent --verbose # lifecycle logs
68
+ wagent --debug # debug logs
69
+ ```
70
+
71
+ ## Message Permissions
72
+
73
+ By default:
74
+
75
+ - The agent only reads/responds to you.
76
+ - It does not auto-reply to others.
77
+ - Group chats are ignored unless someone tags `@wagent`.
78
+ - `@wagent` bypasses filters, including blacklist.
79
+
80
+ The bootstrap conversation lets you configure who it can read, reply to, or message.
81
+
82
+ ## Anti-Ban / Human-Like Behavior
83
+
84
+ - Replies are delayed randomly between 2 and 8 seconds.
85
+ - The agent waits if the chat is currently typing/recording when WhatsApp presence is available.
86
+ - CLI logs are quiet by default.
87
+
88
+ ## Capabilities
89
+
90
+ - Send text, image, video, audio, documents, contacts, polls, location
91
+ - Search/resolve contacts by name, phone, or JID
92
+ - Manage profile/status
93
+ - Manage groups/chats
94
+ - Remember and compact context
95
+ - Enforce read/reply/send policy before model access
96
+
97
+ ## Notes
98
+
99
+ This should run on an always-on machine/VPS. It is not suitable for Vercel serverless because Baileys needs a persistent WhatsApp WebSocket and durable session storage.
100
+
101
+ ## License
102
+
103
+ MIT