agentix-cli 0.13.0 → 0.14.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.
Files changed (48) hide show
  1. package/README.md +50 -493
  2. package/dist/{agent-5KIMJI3F.js → agent-DW3NYIIL.js} +2 -2
  3. package/dist/board-dashboard-6TKE6NMV.js +1435 -0
  4. package/dist/board-dashboard-6TKE6NMV.js.map +1 -0
  5. package/dist/chunk-6U2XOQHU.js +7 -0
  6. package/dist/chunk-6U2XOQHU.js.map +1 -0
  7. package/dist/chunk-DYOBFJLX.js +11 -0
  8. package/dist/chunk-DYOBFJLX.js.map +1 -0
  9. package/dist/chunk-ITZEVXZ4.js +2 -0
  10. package/dist/chunk-ITZEVXZ4.js.map +1 -0
  11. package/dist/chunk-M33CB2H4.js +6 -0
  12. package/dist/chunk-M33CB2H4.js.map +1 -0
  13. package/dist/chunk-NJR5WF5E.js +5 -0
  14. package/dist/chunk-NJR5WF5E.js.map +1 -0
  15. package/dist/chunk-O72LPMBR.js +12 -0
  16. package/dist/chunk-O72LPMBR.js.map +1 -0
  17. package/dist/chunk-RB73FZXJ.js +133 -0
  18. package/dist/chunk-RB73FZXJ.js.map +1 -0
  19. package/dist/{chunk-VH23CDHL.js → chunk-UPT2UMF6.js} +42 -40
  20. package/dist/chunk-UPT2UMF6.js.map +1 -0
  21. package/dist/{chunk-D6EDMQRV.js → chunk-XVYMZ4M7.js} +3 -3
  22. package/dist/cli.js +54 -48
  23. package/dist/cli.js.map +1 -1
  24. package/dist/config-7QJ2QJIC.js +2 -0
  25. package/dist/config-mutator-GAEVGHDD.js +2 -0
  26. package/dist/index.d.ts +670 -69
  27. package/dist/index.js +1 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/registry-YVAG4EO5.js +2 -0
  30. package/dist/registry-YVAG4EO5.js.map +1 -0
  31. package/dist/{usage-dashboard-2TJQBFSH.js → usage-dashboard-M7AFIGMJ.js} +2 -2
  32. package/package.json +9 -1
  33. package/dist/chunk-34UAFPK4.js +0 -10
  34. package/dist/chunk-34UAFPK4.js.map +0 -1
  35. package/dist/chunk-CJ45Y2IR.js +0 -12
  36. package/dist/chunk-CJ45Y2IR.js.map +0 -1
  37. package/dist/chunk-T25UEXVK.js +0 -126
  38. package/dist/chunk-T25UEXVK.js.map +0 -1
  39. package/dist/chunk-VH23CDHL.js.map +0 -1
  40. package/dist/chunk-WJ6ZF6EZ.js +0 -6
  41. package/dist/chunk-WJ6ZF6EZ.js.map +0 -1
  42. package/dist/config-HAD5E4YX.js +0 -2
  43. package/dist/registry-CDWY7CLL.js +0 -2
  44. /package/dist/{agent-5KIMJI3F.js.map → agent-DW3NYIIL.js.map} +0 -0
  45. /package/dist/{chunk-D6EDMQRV.js.map → chunk-XVYMZ4M7.js.map} +0 -0
  46. /package/dist/{config-HAD5E4YX.js.map → config-7QJ2QJIC.js.map} +0 -0
  47. /package/dist/{registry-CDWY7CLL.js.map → config-mutator-GAEVGHDD.js.map} +0 -0
  48. /package/dist/{usage-dashboard-2TJQBFSH.js.map → usage-dashboard-M7AFIGMJ.js.map} +0 -0
package/README.md CHANGED
@@ -6,510 +6,67 @@
6
6
 
7
7
  Existing multi-agent frameworks (CrewAI, AutoGen, LangGraph) are SDK-first, Python-heavy, and cloud-dependent. AgentX is **infrastructure-first** — closer to systemd for AI agents than to another framework.
8
8
 
9
- - **BYOAI** — Bring your own AI. Claude, OpenAI, Ollama, whatever
10
- - **Agents = directories** — Each agent is a workspace with config files. No code required
11
- - **Mesh federation** — Agents on different machines collaborate over Tailscale/VPN
12
- - **Channel routing** — Telegram, GitLab, WhatsApp, Discord, webhooks — built in
13
- - **Cross-channel messaging** — Agents receive on one channel, send to another via `/send` API
14
- - **Wiki memory** — Agents build compounding knowledge from conversations
15
- - **Live monitoring** — Real-time SSE event stream + debug mode with categories
9
+ - **BYOAI** — Claude, OpenAI, Ollama, whatever
10
+ - **Agents = directories** — workspace + config. No code required
11
+ - **Channel routing** built in — Telegram, WhatsApp, Discord, GitLab, webhooks
12
+ - **Mesh federation** — agents across machines collaborate over Tailscale/VPN
13
+ - **Cron + business layer** — scheduled work with KPI tracking
14
+ - **Wiki memory** — compounding knowledge from conversations
15
+ - **Cross-channel `/send`** — receive on X, push to Y
16
+ - **Live monitoring** — SSE event stream, debug categories
16
17
 
17
18
  ## Install
18
19
 
19
20
  ```bash
20
21
  npm install -g agentix-cli
21
- ```
22
-
23
- ## Quick Start
24
-
25
- ```bash
26
- agentx init # Create config + workspace
27
- agentx agent add # Add an agent (interactive)
28
- agentx channel add # Add a channel (Telegram/WhatsApp/Discord/GitLab)
29
- agentx daemon start # Start the daemon
30
- agentx daemon watch # Live activity feed (color-coded)
31
- ```
22
+ agentx init
23
+ agentx agent add
24
+ agentx channel add
25
+ agentx daemon start
26
+ agentx daemon watch # live, color-coded activity
27
+ ```
28
+
29
+ ## Read the docs
30
+
31
+ The full documentation lives at **[https://agentx-docs.pages.dev](https://agentx-docs.pages.dev)** (or run `pnpm docs:dev` locally).
32
+
33
+ - **[Install](docs/install.md)** — from zero to a running daemon in 5 minutes
34
+ - **[Concepts](docs/concepts.md)** — agents, channels, crons, mesh, wiki, business
35
+ - **Journey (simple → advanced):**
36
+ - [1. Telegram Q&A bot](docs/journey/01-telegram-qa-bot.md)
37
+ - [2. Scheduled reports with failure alerts](docs/journey/02-scheduled-reports.md)
38
+ - [3. Multi-agent group chat](docs/journey/03-multi-agent-group.md)
39
+ - [7. Business layer — run a team with AI agents](docs/journey/07-business-layer.md)
40
+ - [8. Mesh federation — two machines, one team](docs/journey/08-mesh-federation.md)
41
+ - **Reference:**
42
+ - [CLI](docs/reference/cli.md)
43
+ - [Config schema](docs/reference/config-schema.md)
44
+ - [Communication matrix](docs/reference/communication-matrix.md)
45
+ - **[Migrate from OpenClaw](docs/migration/from-openclaw.md)**
46
+ - **[Contributing](docs/contributing.md)**
32
47
 
33
48
  ## Architecture
34
49
 
35
- ```
36
- Telegram ──┐
37
- WhatsApp ──┤ ┌─ claude -p --cwd /workspace
38
- Discord ───┤ agentx │
39
- GitLab ───┤ daemon ────┤─ openai API
40
- Cron ──────┤ │
41
- Webhook ───┤ └─ ollama generate
42
- A2A mesh ──┘
43
- │
44
- Context Engine
45
- (10 layers, token-budgeted)
46
- │
47
- ┌─────────┼─────────┐
48
- Wiki Memory Bootstrap
49
- (per-agent) (Haiku) (SOUL.md)
50
+ ```mermaid
51
+ graph LR
52
+ T[Telegram] --> R(Router)
53
+ W[WhatsApp] --> R
54
+ D[Discord] --> R
55
+ G[GitLab] --> R
56
+ C[Cron] --> R
57
+ H[Webhook] --> R
58
+ M[Mesh peer] --> R
59
+ R --> CTX[Context Engine<br/>10 layers, token-budgeted]
60
+ CTX --> AG[Agent workspace]
61
+ AG --> P1[claude -p]
62
+ AG --> P2[OpenAI]
63
+ AG --> P3[Ollama]
64
+ AG -.-> MEM[(Wiki + Memory)]
65
+ AG -.-> R
50
66
  ```
51
67
 
52
68
  Each agent = a workspace directory with Claude Code configuration (`.claude/`, `CLAUDE.md`, skills, hooks, MCP servers). AgentX orchestrates when and where agents run.
53
69
 
54
- ## Communication Matrix
55
-
56
- AgentX supports every communication path: human-to-agent, agent-to-human, agent-to-agent, and cross-channel — across all channels.
57
-
58
- | Path | Telegram | WhatsApp | Discord | GitLab | API |
59
- |------|:--------:|:--------:|:-------:|:------:|:---:|
60
- | **H2A** (human to agent) | mention/DM | route | mention/DM | @username | POST /task |
61
- | **A2H reply** | streaming | text | text | per-agent token | JSON |
62
- | **A2H initiate** | /send | /send | /send | /send | - |
63
- | **A2A delegation** | per-account bot chain | shared number + name prefix | shared + name prefix | @mention webhook | - |
64
- | **Cross-channel** | /send | /send | /send | /send | - |
65
- | **Cross-mesh** | mesh task | mesh task | mesh task | mesh task | mesh task |
66
-
67
- ### Cross-Channel Messaging
68
-
69
- Agents can send messages to ANY channel proactively — not just reply:
70
-
71
- ```bash
72
- # Agent on GitLab sends a notification to Telegram
73
- curl -X POST http://localhost:19900/send \
74
- -H "Content-Type: application/json" \
75
- -d '{"channel":"telegram","chatId":"-1001234567890","text":"Deploy complete!","agentId":"devops"}'
76
- ```
77
-
78
- This enables **H2A2H chains**: a human asks an agent on GitLab to notify someone on WhatsApp. The agent calls `/send` to deliver the message cross-channel.
79
-
80
- ### Automated Client Services
81
-
82
- Define predictable request-response services that intercept messages BEFORE agent routing — no LLM needed for known patterns:
83
-
84
- ```jsonc
85
- "services": {
86
- "monthly-report": {
87
- "name": "Monthly Client Report",
88
- "triggers": [
89
- { "pattern": "monthly report|client records|تقرير الشهر", "channel": "whatsapp" }
90
- ],
91
- "allowedContacts": ["+966"],
92
- "agent": "atlas",
93
- "prompt": "Run the monthly report SQL query and export as CSV...",
94
- "schedule": "0 9 1 * *",
95
- "notify": { "channel": "whatsapp", "chatId": "+966...@s.whatsapp.net" }
96
- }
97
- }
98
- ```
99
-
100
- - **Regex triggers** with optional channel filter (Arabic + English patterns)
101
- - **Contact allowlist** — only authorized contacts can trigger
102
- - **Predefined prompt** — service sends a known prompt, not the user's raw message
103
- - **Optional cron schedule** — also runs automatically on a schedule
104
- - **Cross-channel notify** — results delivered to any channel
105
-
106
- ## Features
107
-
108
- ### Channels
109
-
110
- | Channel | Highlights |
111
- |---------|-----------|
112
- | **Telegram** | Multi-account bots, streaming edits, bot-to-bot delegation, media handling |
113
- | **WhatsApp** | Baileys integration, QR pairing, per-contact/group routing, agent delegation (shared number, name-prefixed) |
114
- | **Discord** | Mention-based routing, DM support, agent delegation |
115
- | **GitLab** | Per-agent identity via PAT tokens, @mention routing, bot-to-bot handoff, image attachments, cascade prevention |
116
- | **Webhooks** | Generic `POST /webhook/:agentId` for Stripe, Sentry, GitHub, etc. |
117
-
118
- ### GitLab Integration
119
-
120
- Agents participate in GitLab as first-class team members:
121
- - **Per-agent identity** — Each agent has its own GitLab user and PAT. Agent usernames resolved from tokens at startup via API (not manual config)
122
- - **Deterministic @mention routing** — `@coding-agent` routes to that agent. Username-to-agent map built from token resolution
123
- - **Bot-to-bot handoff** — QA agent can `@mention` devops in its review, devops picks it up automatically
124
- - **Eye reaction** — Agents react with 👀 using their own token (never the global token)
125
- - **Cascade prevention** — Hidden signature `<!-- agentx:agentId -->`, sent-note dedup, bot-user detection
126
- - **Human mention filtering** — If @mentioned user isn't a known agent, the note is ignored
127
- - **Image attachments** — Screenshots and diagrams in comments are downloaded and passed to agents for analysis
128
-
129
- ### Context Compaction
130
-
131
- Long conversations don't lose context. When session history exceeds threshold:
132
- 1. **Memory flush** — Haiku extracts memorable facts before compaction
133
- 2. **Summarize** — Older messages compressed into a structured summary
134
- 3. **Preserve** — Last 6 messages kept verbatim, tool call pairs kept intact
135
-
136
- ### Message Queue
137
-
138
- When an agent is busy, incoming messages are queued instead of dropped:
139
-
140
- | Mode | Behavior |
141
- |------|----------|
142
- | `collect` (default) | Batch all messages, deliver as one when agent finishes |
143
- | `followup` | Process each queued message as a separate follow-up turn |
144
- | `drop` | Silently discard (for non-critical channels) |
145
-
146
- Configure per agent: `agents.<id>.queueMode`
147
-
148
- ### Sub-Agent Spawning
149
-
150
- Agents can spawn background sub-agents for parallel work:
151
- - `spawn_agent` tool available in orchestrator tier
152
- - Depth-limited (max 3 levels) to prevent infinite chains
153
- - Timeout enforcement per spawn
154
- - Results returned to parent agent
155
-
156
- ### Bootstrap Identity Files
157
-
158
- Structured workspace files loaded into agent context automatically:
159
-
160
- | File | Purpose | Lifecycle |
161
- |------|---------|-----------|
162
- | `SOUL.md` | Personality, tone, boundaries | Persistent |
163
- | `IDENTITY.md` | Name, role, tagline | Persistent |
164
- | `USER.md` | User profile, preferences | Persistent |
165
- | `AGENTS.md` | Operating rules, standing orders | Persistent |
166
- | `BOOTSTRAP.md` | First-run ritual | Auto-deleted after first load |
167
-
168
- ### Heartbeat
169
-
170
- Periodic in-session check-ins (unlike cron which creates isolated sessions):
171
-
172
- ```jsonc
173
- "agents": {
174
- "assistant": {
175
- "heartbeat": {
176
- "enabled": true,
177
- "intervalMinutes": 30,
178
- "prompt": "Check inbox, pending tasks, and system health."
179
- }
180
- }
181
- }
182
- ```
183
-
184
- Heartbeat runs in the agent's existing session context, preserving conversation history and memory.
185
-
186
- ### Cron with Retry & Missed Run Detection
187
-
188
- Scheduled jobs with production-grade reliability:
189
- - **Exponential backoff** on failure: 30s, 1m, 5m, 15m, 60m (up to 5 retries)
190
- - **Missed run detection** — On startup, compares saved last-run times against schedule and catches up
191
- - **Failure notifications** — Configure per-job `notify` destination (any channel)
192
- - **Auto-disable** after 3 consecutive failures (`onError: "disable"`)
193
- - **Health endpoint** — `GET /crons/health` returns healthy/failing/disabled/missed counts
194
-
195
- ```jsonc
196
- "crons": {
197
- "daily-report": {
198
- "schedule": "0 9 * * *",
199
- "agent": "assistant",
200
- "prompt": "Generate today's status report.",
201
- "notify": {
202
- "channel": "telegram",
203
- "chatId": "-1001234567890"
204
- }
205
- }
206
- }
207
- ```
208
-
209
- ### Smart Block Streaming
210
-
211
- Intelligent chunking for message delivery across channels:
212
- - **minChars** threshold — no fragment spam
213
- - **Paragraph-aware breaks** — never splits inside code fences
214
- - **Per-channel defaults** — Telegram (60 chars), WhatsApp (40 chars + human pacing), Discord (80 chars)
215
- - **Coalescing** — idle debounce merges consecutive small blocks
216
-
217
- ### Observability & Debug Mode
218
-
219
- Toggle verbose debug logging at runtime:
220
-
221
- ```bash
222
- # Enable debug for specific categories
223
- curl -X POST http://localhost:19900/debug/on?categories=webhook,agent
224
-
225
- # Check debug state + recent log entries
226
- curl http://localhost:19900/debug
227
-
228
- # Disable
229
- curl -X POST http://localhost:19900/debug/off
230
-
231
- # Or via environment variable
232
- AGENTX_DEBUG=webhook,agent agentx daemon start
233
- ```
234
-
235
- **Categories:** `webhook`, `agent`, `channel`, `cron`, `mesh`, `context`, `memory`, `config`, `all`
236
-
237
- ### Live Monitoring
238
-
239
- ```bash
240
- agentx daemon watch # Color-coded live feed
241
- ```
242
-
243
- Or connect via SSE:
244
- ```bash
245
- curl -N http://localhost:19900/events
246
- ```
247
-
248
- ### Wiki Knowledge Base
249
-
250
- Each agent has a personal wiki — a compounding knowledge artifact built from conversations.
251
-
252
- 1. **Ingest** — Every conversation saved as raw entry
253
- 2. **Absorb** — LLM compiles entries into wiki articles
254
- 3. **Query** — Agents get relevant context filtered by tags
255
- 4. **Sync** — Federated wiki view across mesh peers
256
-
257
- Three compilation modes: `unified` (default), `flat`, `graph`. Wikipedia-style UI at `agentx wiki serve`.
258
-
259
- ### Persistent Agent Memory
260
-
261
- Haiku-powered cross-session memory:
262
- - Facts, preferences, commitments extracted after each conversation
263
- - BM25 full-text search across memories
264
- - Injected into context for future conversations
265
- - Auto-pruning with configurable expiry
266
-
267
- ### Skills
268
-
269
- Reusable capabilities installed per-agent or globally:
270
-
271
- ```bash
272
- agentx skill add skills/my-skill --all
273
- agentx skill list
274
- ```
275
-
276
- ### Mesh Federation
277
-
278
- Agents on different machines collaborate:
279
-
280
- ```bash
281
- agentx mesh add server-2 http://100.x.x.x:19900
282
- agentx daemon send devops "check disk space" --peer server-2
283
- ```
284
-
285
- - Static or mDNS peer discovery
286
- - Health checks every 60s
287
- - Wiki sync across peers
288
- - Cross-machine agent delegation via A2A protocol
289
-
290
- ### MCP Server
291
-
292
- AgentX exposes its full capabilities as MCP tools, usable from Claude Code, Cursor, or Windsurf:
293
-
294
- | Tool | Description |
295
- |------|-------------|
296
- | `agentx_generate` | Generate code/components/APIs with tech stack awareness |
297
- | `agentx_inspect` | Analyze project tech stack and schemas |
298
- | `agentx_send` | Send messages to any channel (cross-channel routing) |
299
- | `agentx_task` | Delegate work to a specific agent |
300
- | `agentx_agents` | List agents and their status |
301
- | `agentx_health` | Daemon health check |
302
- | `agentx_crons` | Cron job health with error details |
303
- | `agentx_debug` | Toggle debug mode with categories |
304
-
305
- ```bash
306
- # Start the MCP server (stdio transport)
307
- agentx mcp
308
- ```
309
-
310
- Configure in Claude Code's `.claude/settings.json` or Cursor's MCP settings.
311
-
312
- ## CLI Reference
313
-
314
- ```bash
315
- # Daemon
316
- agentx daemon start [--detach]
317
- agentx daemon stop
318
- agentx daemon status
319
- agentx daemon watch
320
- agentx daemon logs [-f]
321
- agentx daemon send <agent> <msg> [--peer <name>]
322
- agentx daemon deploy <host> -i key [--restart]
323
-
324
- # Wiki
325
- agentx wiki status [--mode M]
326
- agentx wiki absorb [--agent X] [--mode M] [--dry-run]
327
- agentx wiki serve [--mode M] [--peer URL]
328
- agentx wiki sync [--peer URL]
329
- agentx wiki compare --agent X
330
- agentx wiki lint [--agent X]
331
- agentx wiki search <query>
332
-
333
- # Management
334
- agentx agent add | list | remove <id>
335
- agentx channel add | list
336
- agentx cron add | list | enable | disable <id>
337
- agentx mesh add | list | remove <name>
338
- agentx skill add <path> [--agent X] [--all] | list
339
- agentx hook add <agent>
340
- agentx config check | show
341
- agentx init [--force]
342
-
343
- # Usage
344
- agentx usage [report] [--days N]
345
- ```
346
-
347
- ## Configuration
348
-
349
- Single `agentx.json`. Environment variables expanded (`${VAR_NAME}`). Auto-loads `.env`.
350
-
351
- ```jsonc
352
- {
353
- "node": { "id": "my-machine", "name": "My Machine", "bind": "0.0.0.0:19900" },
354
-
355
- "agents": {
356
- "assistant": {
357
- "name": "Assistant",
358
- "workspace": "/path/to/workspace",
359
- "tier": "claude-code", // "sdk" or "orchestrator"
360
- "model": "claude-sonnet-4-6",
361
- "mentions": ["@my_bot", "my-gitlab-user"],
362
- "maxConcurrent": 2,
363
- "queueMode": "collect", // "followup" or "drop"
364
- "systemPrompt": "You are a helpful assistant.",
365
- "heartbeat": {
366
- "enabled": false,
367
- "intervalMinutes": 30,
368
- "prompt": "Check inbox and pending tasks."
369
- }
370
- }
371
- },
372
-
373
- "channels": {
374
- "telegram": {
375
- "enabled": true,
376
- "accounts": {
377
- "default": { "token": "${TG_BOT_TOKEN}", "agentBinding": "assistant" }
378
- },
379
- "policy": { "dm": "pair", "group": "mention-required" }
380
- },
381
- "gitlab": {
382
- "enabled": true,
383
- "host": "https://gitlab.example.com",
384
- "token": "${GITLAB_TOKEN}",
385
- "webhookPort": 18810,
386
- "routes": [
387
- { "project": "team/project-a", "agent": "pm-a" },
388
- { "project": "*", "agent": "default-agent" }
389
- ],
390
- "agentMappings": [
391
- {
392
- "agentId": "coder",
393
- "gitlabUsernames": ["coder-bot"],
394
- "token": "${CODER_GITLAB_TOKEN}"
395
- }
396
- ]
397
- }
398
- },
399
-
400
- "crons": {
401
- "daily-report": {
402
- "enabled": true,
403
- "schedule": "0 9 * * *",
404
- "timezone": "UTC",
405
- "agent": "assistant",
406
- "prompt": "Generate today's status report.",
407
- "onError": "notify",
408
- "notify": {
409
- "channel": "telegram",
410
- "chatId": "-1001234567890"
411
- }
412
- }
413
- },
414
-
415
- "mesh": {
416
- "enabled": true,
417
- "peers": [
418
- { "url": "http://100.x.x.x:19900", "name": "server-2" }
419
- ]
420
- }
421
- }
422
- ```
423
-
424
- ## HTTP API
425
-
426
- | Endpoint | Method | Description |
427
- |----------|--------|-------------|
428
- | `/health` | GET | Status, agents, crons, mesh, usage |
429
- | `/events` | GET | SSE live event stream |
430
- | `/agents` | GET | List agents |
431
- | `/channels` | GET | List registered channels |
432
- | `/crons` | GET | List cron jobs |
433
- | `/crons/health` | GET | Cron health: healthy/failing/disabled/missed |
434
- | `/services` | GET | List registered automated services |
435
- | `/task` | POST | `{ "agent": "id", "message": "..." }` |
436
- | `/send` | POST | `{ "channel": "telegram", "chatId": "...", "text": "...", "agentId": "..." }` |
437
- | `/mesh/task` | POST | `{ "peer": "name", "message": "..." }` |
438
- | `/webhook/:agentId[/:source]` | POST | Webhook callback |
439
- | `/v1/chat/completions` | POST | OpenAI-compatible endpoint |
440
- | `/debug` | GET | Debug state + recent log entries |
441
- | `/debug/on` | POST | Enable debug (`?categories=webhook,agent`) |
442
- | `/debug/off` | POST | Disable debug |
443
- | `/.well-known/agent-card.json` | GET | A2A agent discovery |
444
-
445
- ## Context Engine
446
-
447
- Every agent prompt is built from structured layers, each with a token budget:
448
-
449
- | Layer | Priority | Budget | Content |
450
- |-------|----------|--------|---------|
451
- | Channel | 1 | 200 | Channel type + formatting rules |
452
- | Scope | 2 | 200 | Group name, project path, or DM |
453
- | Landscape | 3 | 800 | Team roster, mesh peers, rules, /send API docs |
454
- | Identity | 4 | 200 | Agent system prompt |
455
- | Bootstrap | 4.5 | 500 | SOUL.md, IDENTITY.md, AGENTS.md |
456
- | Intent | 5 | 200 | Extracted: deploy, review, bugfix... |
457
- | Artifacts | 6 | 500 | Media, reply-to text, issue refs |
458
- | Memory | 6.5 | 600 | Cross-session facts (Haiku-extracted) |
459
- | History | 7 | 1200 | Conversation or session history |
460
- | Cross-chat | 7 | 800 | Context from other active chats |
461
- | Wiki | 8 | 1000 | Tag-matched knowledge articles |
462
-
463
- Total budget: 6000 tokens. Context always injected, even on resumed sessions.
464
-
465
- ## Three Execution Tiers
466
-
467
- | Tier | How | Auth | Best for |
468
- |------|-----|------|----------|
469
- | `claude-code` | Spawns `claude` CLI | Subscription | Full power: subagents, MCP, skills, hooks, 1M context |
470
- | `sdk` | Claude Agent SDK | API key | Programmatic control, headless servers |
471
- | `orchestrator` | AgentX's own loop | Any provider key | Non-Claude providers (OpenAI, Ollama) |
472
-
473
- ## Daemon Management
474
-
475
- Single-instance guard via PID file — prevents orphan processes on restart:
476
-
477
- ```bash
478
- agentx daemon start # Checks .agentx/daemon.pid, exits if another is running
479
- agentx daemon stop # Graceful shutdown, saves cron last-run times
480
- systemctl --user restart agentx-daemon.service # Safe — PID guard prevents duplicates
481
- ```
482
-
483
- ## Use Cases
484
-
485
- - **Team of Telegram bots** — each project gets its own bot + agent
486
- - **GitLab CI/CD team** — coder, QA, devops, PM agents collaborate on issues via @mentions
487
- - **Cross-channel notifications** — GitLab agent notifies humans on Telegram/WhatsApp
488
- - **WhatsApp delegation** — shared phone number, agents identified by name prefix
489
- - **Scheduled automation** — cron jobs with retry, missed-run catch-up, failure alerts
490
- - **Multi-machine swarm** — agents on laptop + server collaborate via mesh
491
- - **Webhook automation** — Sentry error -> DevOps investigates, Stripe payment -> billing processes
492
- - **Personal wiki** — Every conversation compounds into searchable knowledge
493
-
494
- ## Contributing
495
-
496
- ```bash
497
- git clone https://github.com/anis-marrouchi/agentx.git
498
- cd agentx
499
- npm install
500
- npm run build # ESM build via tsup
501
- npm test # Run tests
502
- agentx init --force # Create local config
503
- agentx daemon start # Start dev daemon
504
- agentx daemon watch # See what's happening
505
- ```
506
-
507
- Areas we're looking for help:
508
- - **Testing** — Unit and integration tests
509
- - **Channels** — Slack, Microsoft Teams adapters
510
- - **Dashboard** — Web UI for agent management
511
- - **Security** — Audit of token handling and permission boundaries
512
-
513
70
  ## License
514
71
 
515
- MIT
72
+ MIT.
@@ -1,2 +1,2 @@
1
- import{s as a,t as b,u as c}from"./chunk-D6EDMQRV.js";import"./chunk-SFQUP3BP.js";import"./chunk-CJ45Y2IR.js";import"./chunk-KXZMYLHQ.js";import"./chunk-M7HKBG3V.js";import"./chunk-MCJUAE6V.js";import"./chunk-DSYKYZMT.js";import"./chunk-QOYAX2FT.js";import"./chunk-4YCH6IZV.js";export{a as createAgentContext,b as generate,c as generateStream};
2
- //# sourceMappingURL=agent-5KIMJI3F.js.map
1
+ import{s as a,t as b,u as c}from"./chunk-XVYMZ4M7.js";import"./chunk-SFQUP3BP.js";import"./chunk-O72LPMBR.js";import"./chunk-KXZMYLHQ.js";import"./chunk-M7HKBG3V.js";import"./chunk-MCJUAE6V.js";import"./chunk-DSYKYZMT.js";import"./chunk-QOYAX2FT.js";import"./chunk-4YCH6IZV.js";export{a as createAgentContext,b as generate,c as generateStream};
2
+ //# sourceMappingURL=agent-DW3NYIIL.js.map