agentix-cli 0.9.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 (71) hide show
  1. package/README.md +50 -443
  2. package/dist/agent-DW3NYIIL.js +2 -0
  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-HI24KAEY.js +54 -0
  10. package/dist/chunk-HI24KAEY.js.map +1 -0
  11. package/dist/chunk-ITZEVXZ4.js +2 -0
  12. package/dist/chunk-ITZEVXZ4.js.map +1 -0
  13. package/dist/chunk-M33CB2H4.js +6 -0
  14. package/dist/chunk-M33CB2H4.js.map +1 -0
  15. package/dist/chunk-MCJUAE6V.js +6 -0
  16. package/dist/chunk-MCJUAE6V.js.map +1 -0
  17. package/dist/chunk-NJR5WF5E.js +5 -0
  18. package/dist/chunk-NJR5WF5E.js.map +1 -0
  19. package/dist/chunk-O72LPMBR.js +12 -0
  20. package/dist/chunk-O72LPMBR.js.map +1 -0
  21. package/dist/chunk-QOYAX2FT.js +2 -0
  22. package/dist/chunk-QOYAX2FT.js.map +1 -0
  23. package/dist/chunk-QZP65I2H.js +45 -0
  24. package/dist/chunk-QZP65I2H.js.map +1 -0
  25. package/dist/chunk-RB73FZXJ.js +133 -0
  26. package/dist/chunk-RB73FZXJ.js.map +1 -0
  27. package/dist/chunk-UPT2UMF6.js +159 -0
  28. package/dist/chunk-UPT2UMF6.js.map +1 -0
  29. package/dist/{chunk-SBUX74OU.js → chunk-XVYMZ4M7.js} +5 -5
  30. package/dist/cli.js +53 -50
  31. package/dist/cli.js.map +1 -1
  32. package/dist/compaction-7I3E5QUO.js +28 -0
  33. package/dist/compaction-7I3E5QUO.js.map +1 -0
  34. package/dist/config-7QJ2QJIC.js +2 -0
  35. package/dist/config-mutator-GAEVGHDD.js +2 -0
  36. package/dist/index.d.ts +1715 -106
  37. package/dist/index.js +39 -35
  38. package/dist/index.js.map +1 -1
  39. package/dist/loader-YQE6XJBT.js +2 -0
  40. package/dist/registry-YVAG4EO5.js +2 -0
  41. package/dist/registry-YVAG4EO5.js.map +1 -0
  42. package/dist/{usage-dashboard-2TJQBFSH.js → usage-dashboard-M7AFIGMJ.js} +2 -2
  43. package/dist/workspace-setup-QQTCJY4B.js +2 -0
  44. package/dist/workspace-setup-QQTCJY4B.js.map +1 -0
  45. package/package.json +9 -1
  46. package/dist/agent-QYQVGKLM.js +0 -2
  47. package/dist/chunk-34UAFPK4.js +0 -10
  48. package/dist/chunk-34UAFPK4.js.map +0 -1
  49. package/dist/chunk-BAIQJHQF.js +0 -64
  50. package/dist/chunk-BAIQJHQF.js.map +0 -1
  51. package/dist/chunk-BHDLKX3G.js +0 -6
  52. package/dist/chunk-BHDLKX3G.js.map +0 -1
  53. package/dist/chunk-CJ45Y2IR.js +0 -12
  54. package/dist/chunk-CJ45Y2IR.js.map +0 -1
  55. package/dist/chunk-FRFR27IN.js +0 -3
  56. package/dist/chunk-FRFR27IN.js.map +0 -1
  57. package/dist/chunk-IVVVYXPH.js +0 -136
  58. package/dist/chunk-IVVVYXPH.js.map +0 -1
  59. package/dist/chunk-X32247GM.js +0 -2
  60. package/dist/chunk-X32247GM.js.map +0 -1
  61. package/dist/compaction-E3MQRLTL.js +0 -28
  62. package/dist/compaction-E3MQRLTL.js.map +0 -1
  63. package/dist/config-MSWKC466.js +0 -2
  64. package/dist/loader-6VSM6FSY.js +0 -2
  65. package/dist/registry-FP6FUOXF.js +0 -2
  66. /package/dist/{agent-QYQVGKLM.js.map → agent-DW3NYIIL.js.map} +0 -0
  67. /package/dist/{chunk-SBUX74OU.js.map → chunk-XVYMZ4M7.js.map} +0 -0
  68. /package/dist/{config-MSWKC466.js.map → config-7QJ2QJIC.js.map} +0 -0
  69. /package/dist/{loader-6VSM6FSY.js.map → config-mutator-GAEVGHDD.js.map} +0 -0
  70. /package/dist/{registry-FP6FUOXF.js.map → loader-YQE6XJBT.js.map} +0 -0
  71. /package/dist/{usage-dashboard-2TJQBFSH.js.map → usage-dashboard-M7AFIGMJ.js.map} +0 -0
package/README.md CHANGED
@@ -6,460 +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
- ## Features
81
-
82
- ### Channels
83
-
84
- | Channel | Highlights |
85
- |---------|-----------|
86
- | **Telegram** | Multi-account bots, streaming edits, bot-to-bot delegation, media handling |
87
- | **WhatsApp** | Baileys integration, QR pairing, per-contact/group routing, agent delegation (shared number, name-prefixed) |
88
- | **Discord** | Mention-based routing, DM support, agent delegation |
89
- | **GitLab** | Per-agent identity via PAT tokens, @mention routing resolved from API, bot-to-bot handoff, cascade prevention |
90
- | **Webhooks** | Generic `POST /webhook/:agentId` for Stripe, Sentry, GitHub, etc. |
91
-
92
- ### GitLab Integration
93
-
94
- Agents participate in GitLab as first-class team members:
95
- - **Per-agent identity** — Each agent has its own GitLab user and PAT. Agent usernames resolved from tokens at startup via API (not manual config)
96
- - **Deterministic @mention routing** — `@coding-agent` routes to that agent. Username-to-agent map built from token resolution
97
- - **Bot-to-bot handoff** — QA agent can `@mention` devops in its review, devops picks it up automatically
98
- - **Eye reaction** — Agents react with 👀 using their own token (never the global token)
99
- - **Cascade prevention** — Hidden signature `<!-- agentx:agentId -->`, sent-note dedup, bot-user detection
100
- - **Human mention filtering** — If @mentioned user isn't a known agent, the note is ignored
101
-
102
- ### Context Compaction
103
-
104
- Long conversations don't lose context. When session history exceeds threshold:
105
- 1. **Memory flush** — Haiku extracts memorable facts before compaction
106
- 2. **Summarize** — Older messages compressed into a structured summary
107
- 3. **Preserve** — Last 6 messages kept verbatim, tool call pairs kept intact
108
-
109
- ### Message Queue
110
-
111
- When an agent is busy, incoming messages are queued instead of dropped:
112
-
113
- | Mode | Behavior |
114
- |------|----------|
115
- | `collect` (default) | Batch all messages, deliver as one when agent finishes |
116
- | `followup` | Process each queued message as a separate follow-up turn |
117
- | `drop` | Silently discard (for non-critical channels) |
118
-
119
- Configure per agent: `agents.<id>.queueMode`
120
-
121
- ### Sub-Agent Spawning
122
-
123
- Agents can spawn background sub-agents for parallel work:
124
- - `spawn_agent` tool available in orchestrator tier
125
- - Depth-limited (max 3 levels) to prevent infinite chains
126
- - Timeout enforcement per spawn
127
- - Results returned to parent agent
128
-
129
- ### Bootstrap Identity Files
130
-
131
- Structured workspace files loaded into agent context automatically:
132
-
133
- | File | Purpose | Lifecycle |
134
- |------|---------|-----------|
135
- | `SOUL.md` | Personality, tone, boundaries | Persistent |
136
- | `IDENTITY.md` | Name, role, tagline | Persistent |
137
- | `USER.md` | User profile, preferences | Persistent |
138
- | `AGENTS.md` | Operating rules, standing orders | Persistent |
139
- | `BOOTSTRAP.md` | First-run ritual | Auto-deleted after first load |
140
-
141
- ### Heartbeat
142
-
143
- Periodic in-session check-ins (unlike cron which creates isolated sessions):
144
-
145
- ```jsonc
146
- "agents": {
147
- "assistant": {
148
- "heartbeat": {
149
- "enabled": true,
150
- "intervalMinutes": 30,
151
- "prompt": "Check inbox, pending tasks, and system health."
152
- }
153
- }
154
- }
155
- ```
156
-
157
- Heartbeat runs in the agent's existing session context, preserving conversation history and memory.
158
-
159
- ### Cron with Retry & Missed Run Detection
160
-
161
- Scheduled jobs with production-grade reliability:
162
- - **Exponential backoff** on failure: 30s, 1m, 5m, 15m, 60m (up to 5 retries)
163
- - **Missed run detection** — On startup, compares saved last-run times against schedule and catches up
164
- - **Failure notifications** — Configure per-job `notify` destination (any channel)
165
- - **Auto-disable** after 3 consecutive failures (`onError: "disable"`)
166
- - **Health endpoint** — `GET /crons/health` returns healthy/failing/disabled/missed counts
167
-
168
- ```jsonc
169
- "crons": {
170
- "daily-report": {
171
- "schedule": "0 9 * * *",
172
- "agent": "assistant",
173
- "prompt": "Generate today's status report.",
174
- "notify": {
175
- "channel": "telegram",
176
- "chatId": "-1001234567890"
177
- }
178
- }
179
- }
180
- ```
181
-
182
- ### Smart Block Streaming
183
-
184
- Intelligent chunking for message delivery across channels:
185
- - **minChars** threshold — no fragment spam
186
- - **Paragraph-aware breaks** — never splits inside code fences
187
- - **Per-channel defaults** — Telegram (60 chars), WhatsApp (40 chars + human pacing), Discord (80 chars)
188
- - **Coalescing** — idle debounce merges consecutive small blocks
189
-
190
- ### Observability & Debug Mode
191
-
192
- Toggle verbose debug logging at runtime:
193
-
194
- ```bash
195
- # Enable debug for specific categories
196
- curl -X POST http://localhost:19900/debug/on?categories=webhook,agent
197
-
198
- # Check debug state + recent log entries
199
- curl http://localhost:19900/debug
200
-
201
- # Disable
202
- curl -X POST http://localhost:19900/debug/off
203
-
204
- # Or via environment variable
205
- AGENTX_DEBUG=webhook,agent agentx daemon start
206
- ```
207
-
208
- **Categories:** `webhook`, `agent`, `channel`, `cron`, `mesh`, `context`, `memory`, `config`, `all`
209
-
210
- ### Live Monitoring
211
-
212
- ```bash
213
- agentx daemon watch # Color-coded live feed
214
- ```
215
-
216
- Or connect via SSE:
217
- ```bash
218
- curl -N http://localhost:19900/events
219
- ```
220
-
221
- ### Wiki Knowledge Base
222
-
223
- Each agent has a personal wiki — a compounding knowledge artifact built from conversations.
224
-
225
- 1. **Ingest** — Every conversation saved as raw entry
226
- 2. **Absorb** — LLM compiles entries into wiki articles
227
- 3. **Query** — Agents get relevant context filtered by tags
228
- 4. **Sync** — Federated wiki view across mesh peers
229
-
230
- Three compilation modes: `unified` (default), `flat`, `graph`. Wikipedia-style UI at `agentx wiki serve`.
231
-
232
- ### Persistent Agent Memory
233
-
234
- Haiku-powered cross-session memory:
235
- - Facts, preferences, commitments extracted after each conversation
236
- - BM25 full-text search across memories
237
- - Injected into context for future conversations
238
- - Auto-pruning with configurable expiry
239
-
240
- ### Skills
241
-
242
- Reusable capabilities installed per-agent or globally:
243
-
244
- ```bash
245
- agentx skill add skills/my-skill --all
246
- agentx skill list
247
- ```
248
-
249
- ### Mesh Federation
250
-
251
- Agents on different machines collaborate:
252
-
253
- ```bash
254
- agentx mesh add server-2 http://100.x.x.x:19900
255
- agentx daemon send devops "check disk space" --peer server-2
256
- ```
257
-
258
- - Static or mDNS peer discovery
259
- - Health checks every 60s
260
- - Wiki sync across peers
261
- - Cross-machine agent delegation via A2A protocol
262
-
263
- ## CLI Reference
264
-
265
- ```bash
266
- # Daemon
267
- agentx daemon start [--detach]
268
- agentx daemon stop
269
- agentx daemon status
270
- agentx daemon watch
271
- agentx daemon logs [-f]
272
- agentx daemon send <agent> <msg> [--peer <name>]
273
- agentx daemon deploy <host> -i key [--restart]
274
-
275
- # Wiki
276
- agentx wiki status [--mode M]
277
- agentx wiki absorb [--agent X] [--mode M] [--dry-run]
278
- agentx wiki serve [--mode M] [--peer URL]
279
- agentx wiki sync [--peer URL]
280
- agentx wiki compare --agent X
281
- agentx wiki lint [--agent X]
282
- agentx wiki search <query>
283
-
284
- # Management
285
- agentx agent add | list | remove <id>
286
- agentx channel add | list
287
- agentx cron add | list | enable | disable <id>
288
- agentx mesh add | list | remove <name>
289
- agentx skill add <path> [--agent X] [--all] | list
290
- agentx hook add <agent>
291
- agentx config check | show
292
- agentx init [--force]
293
-
294
- # Usage
295
- agentx usage [report] [--days N]
296
- ```
297
-
298
- ## Configuration
299
-
300
- Single `agentx.json`. Environment variables expanded (`${VAR_NAME}`). Auto-loads `.env`.
301
-
302
- ```jsonc
303
- {
304
- "node": { "id": "my-machine", "name": "My Machine", "bind": "0.0.0.0:19900" },
305
-
306
- "agents": {
307
- "assistant": {
308
- "name": "Assistant",
309
- "workspace": "/path/to/workspace",
310
- "tier": "claude-code", // "sdk" or "orchestrator"
311
- "model": "claude-sonnet-4-6",
312
- "mentions": ["@my_bot", "my-gitlab-user"],
313
- "maxConcurrent": 2,
314
- "queueMode": "collect", // "followup" or "drop"
315
- "systemPrompt": "You are a helpful assistant.",
316
- "heartbeat": {
317
- "enabled": false,
318
- "intervalMinutes": 30,
319
- "prompt": "Check inbox and pending tasks."
320
- }
321
- }
322
- },
323
-
324
- "channels": {
325
- "telegram": {
326
- "enabled": true,
327
- "accounts": {
328
- "default": { "token": "${TG_BOT_TOKEN}", "agentBinding": "assistant" }
329
- },
330
- "policy": { "dm": "pair", "group": "mention-required" }
331
- },
332
- "gitlab": {
333
- "enabled": true,
334
- "host": "https://gitlab.example.com",
335
- "token": "${GITLAB_TOKEN}",
336
- "webhookPort": 18810,
337
- "routes": [
338
- { "project": "team/project-a", "agent": "pm-a" },
339
- { "project": "*", "agent": "default-agent" }
340
- ],
341
- "agentMappings": [
342
- {
343
- "agentId": "coder",
344
- "gitlabUsernames": ["coder-bot"],
345
- "token": "${CODER_GITLAB_TOKEN}"
346
- }
347
- ]
348
- }
349
- },
350
-
351
- "crons": {
352
- "daily-report": {
353
- "enabled": true,
354
- "schedule": "0 9 * * *",
355
- "timezone": "UTC",
356
- "agent": "assistant",
357
- "prompt": "Generate today's status report.",
358
- "onError": "notify",
359
- "notify": {
360
- "channel": "telegram",
361
- "chatId": "-1001234567890"
362
- }
363
- }
364
- },
365
-
366
- "mesh": {
367
- "enabled": true,
368
- "peers": [
369
- { "url": "http://100.x.x.x:19900", "name": "server-2" }
370
- ]
371
- }
372
- }
373
- ```
374
-
375
- ## HTTP API
376
-
377
- | Endpoint | Method | Description |
378
- |----------|--------|-------------|
379
- | `/health` | GET | Status, agents, crons, mesh, usage |
380
- | `/events` | GET | SSE live event stream |
381
- | `/agents` | GET | List agents |
382
- | `/channels` | GET | List registered channels |
383
- | `/crons` | GET | List cron jobs |
384
- | `/crons/health` | GET | Cron health: healthy/failing/disabled/missed |
385
- | `/task` | POST | `{ "agent": "id", "message": "..." }` |
386
- | `/send` | POST | `{ "channel": "telegram", "chatId": "...", "text": "...", "agentId": "..." }` |
387
- | `/mesh/task` | POST | `{ "peer": "name", "message": "..." }` |
388
- | `/webhook/:agentId[/:source]` | POST | Webhook callback |
389
- | `/v1/chat/completions` | POST | OpenAI-compatible endpoint |
390
- | `/debug` | GET | Debug state + recent log entries |
391
- | `/debug/on` | POST | Enable debug (`?categories=webhook,agent`) |
392
- | `/debug/off` | POST | Disable debug |
393
- | `/.well-known/agent-card.json` | GET | A2A agent discovery |
394
-
395
- ## Context Engine
396
-
397
- Every agent prompt is built from structured layers, each with a token budget:
398
-
399
- | Layer | Priority | Budget | Content |
400
- |-------|----------|--------|---------|
401
- | Channel | 1 | 200 | Channel type + formatting rules |
402
- | Scope | 2 | 200 | Group name, project path, or DM |
403
- | Landscape | 3 | 800 | Team roster, mesh peers, rules, /send API docs |
404
- | Identity | 4 | 200 | Agent system prompt |
405
- | Bootstrap | 4.5 | 500 | SOUL.md, IDENTITY.md, AGENTS.md |
406
- | Intent | 5 | 200 | Extracted: deploy, review, bugfix... |
407
- | Artifacts | 6 | 500 | Media, reply-to text, issue refs |
408
- | Memory | 6.5 | 600 | Cross-session facts (Haiku-extracted) |
409
- | History | 7 | 1200 | Conversation or session history |
410
- | Cross-chat | 7 | 800 | Context from other active chats |
411
- | Wiki | 8 | 1000 | Tag-matched knowledge articles |
412
-
413
- Total budget: 6000 tokens. Context always injected, even on resumed sessions.
414
-
415
- ## Three Execution Tiers
416
-
417
- | Tier | How | Auth | Best for |
418
- |------|-----|------|----------|
419
- | `claude-code` | Spawns `claude` CLI | Subscription | Full power: subagents, MCP, skills, hooks, 1M context |
420
- | `sdk` | Claude Agent SDK | API key | Programmatic control, headless servers |
421
- | `orchestrator` | AgentX's own loop | Any provider key | Non-Claude providers (OpenAI, Ollama) |
422
-
423
- ## Daemon Management
424
-
425
- Single-instance guard via PID file — prevents orphan processes on restart:
426
-
427
- ```bash
428
- agentx daemon start # Checks .agentx/daemon.pid, exits if another is running
429
- agentx daemon stop # Graceful shutdown, saves cron last-run times
430
- systemctl --user restart agentx-daemon.service # Safe — PID guard prevents duplicates
431
- ```
432
-
433
- ## Use Cases
434
-
435
- - **Team of Telegram bots** — each project gets its own bot + agent
436
- - **GitLab CI/CD team** — coder, QA, devops, PM agents collaborate on issues via @mentions
437
- - **Cross-channel notifications** — GitLab agent notifies humans on Telegram/WhatsApp
438
- - **WhatsApp delegation** — shared phone number, agents identified by name prefix
439
- - **Scheduled automation** — cron jobs with retry, missed-run catch-up, failure alerts
440
- - **Multi-machine swarm** — agents on laptop + server collaborate via mesh
441
- - **Webhook automation** — Sentry error -> DevOps investigates, Stripe payment -> billing processes
442
- - **Personal wiki** — Every conversation compounds into searchable knowledge
443
-
444
- ## Contributing
445
-
446
- ```bash
447
- git clone https://github.com/anis-marrouchi/agentx.git
448
- cd agentx
449
- npm install
450
- npm run build # ESM build via tsup
451
- npm test # Run tests
452
- agentx init --force # Create local config
453
- agentx daemon start # Start dev daemon
454
- agentx daemon watch # See what's happening
455
- ```
456
-
457
- Areas we're looking for help:
458
- - **Testing** — Unit and integration tests
459
- - **Channels** — Slack, Microsoft Teams adapters
460
- - **Dashboard** — Web UI for agent management
461
- - **Security** — Audit of token handling and permission boundaries
462
-
463
70
  ## License
464
71
 
465
- MIT
72
+ MIT.
@@ -0,0 +1,2 @@
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