@datasynx/agentic-crm 0.1.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 (251) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +767 -0
  3. package/dist/agent-config-zPvcqu07.js +14 -0
  4. package/dist/agent-config-zPvcqu07.js.map +1 -0
  5. package/dist/approvals-DpjxGHFp.js +67 -0
  6. package/dist/approvals-DpjxGHFp.js.map +1 -0
  7. package/dist/ask-CID3jnuL.js +52 -0
  8. package/dist/ask-CID3jnuL.js.map +1 -0
  9. package/dist/audit-log-DNMY9mUZ.js +49 -0
  10. package/dist/audit-log-DNMY9mUZ.js.map +1 -0
  11. package/dist/auth-CyFuu9X_.js +2 -0
  12. package/dist/auth-DFWwWcYD.js +93 -0
  13. package/dist/auth-DFWwWcYD.js.map +1 -0
  14. package/dist/autofill-Di_-SP7t.js +51 -0
  15. package/dist/autofill-Di_-SP7t.js.map +1 -0
  16. package/dist/backup-CeMk9z86.js +417 -0
  17. package/dist/backup-CeMk9z86.js.map +1 -0
  18. package/dist/backup-f_hC7rBV.js +2 -0
  19. package/dist/calendly-Bft_wwji.js +52 -0
  20. package/dist/calendly-Bft_wwji.js.map +1 -0
  21. package/dist/calendly-D3coO92o.cjs +53 -0
  22. package/dist/calendly-D3coO92o.cjs.map +1 -0
  23. package/dist/chunk-DakpK96I.cjs +43 -0
  24. package/dist/churn-C28IgnAj.js +54 -0
  25. package/dist/churn-C28IgnAj.js.map +1 -0
  26. package/dist/cli.js +4396 -0
  27. package/dist/cli.js.map +1 -0
  28. package/dist/colors-BG07TZQz.js +11 -0
  29. package/dist/colors-BG07TZQz.js.map +1 -0
  30. package/dist/compliance-B1kk5-YS.js +115 -0
  31. package/dist/compliance-B1kk5-YS.js.map +1 -0
  32. package/dist/compliance-B91zNvCR.cjs +156 -0
  33. package/dist/compliance-B91zNvCR.cjs.map +1 -0
  34. package/dist/compliance-CKSBoQUe.js +118 -0
  35. package/dist/compliance-CKSBoQUe.js.map +1 -0
  36. package/dist/compliance-CujOqAKk.js +2 -0
  37. package/dist/context-builder-BzWAp3Zs.js +96 -0
  38. package/dist/context-builder-BzWAp3Zs.js.map +1 -0
  39. package/dist/context-builder-DlrRcqmJ.js +2 -0
  40. package/dist/conversation-intel-mm7Lhemh.js +72 -0
  41. package/dist/conversation-intel-mm7Lhemh.js.map +1 -0
  42. package/dist/custom-fields-CzNeD3_v.js +2 -0
  43. package/dist/custom-fields-Pl2t9xzp.js +73 -0
  44. package/dist/custom-fields-Pl2t9xzp.js.map +1 -0
  45. package/dist/custom-objects-BHgn1GEX.js +78 -0
  46. package/dist/custom-objects-BHgn1GEX.js.map +1 -0
  47. package/dist/custom-objects-CIFrmQ2V.js +2 -0
  48. package/dist/customer-dir-DIylZ8Q6.js +75 -0
  49. package/dist/customer-dir-DIylZ8Q6.js.map +1 -0
  50. package/dist/daemon/worker.js +207 -0
  51. package/dist/daemon/worker.js.map +1 -0
  52. package/dist/enrichment-3XvgGDfB.js +103 -0
  53. package/dist/enrichment-3XvgGDfB.js.map +1 -0
  54. package/dist/file-lock-B_zi7NQl.js +22 -0
  55. package/dist/file-lock-B_zi7NQl.js.map +1 -0
  56. package/dist/gmail-auth-BP6cJwfw.js +40 -0
  57. package/dist/gmail-auth-BP6cJwfw.js.map +1 -0
  58. package/dist/gmail-auth-DxakCtGm.cjs +44 -0
  59. package/dist/gmail-auth-DxakCtGm.cjs.map +1 -0
  60. package/dist/gmail-auth-OComS92L.js +40 -0
  61. package/dist/gmail-auth-OComS92L.js.map +1 -0
  62. package/dist/gmail-push-watch-DELQFMPk.js +20 -0
  63. package/dist/gmail-push-watch-DELQFMPk.js.map +1 -0
  64. package/dist/gmail-sender-StTpJ9Ub.js +32 -0
  65. package/dist/gmail-sender-StTpJ9Ub.js.map +1 -0
  66. package/dist/gmail-sync-DIaxInDT.js +204 -0
  67. package/dist/gmail-sync-DIaxInDT.js.map +1 -0
  68. package/dist/gmail-sync-hHm9gaWd.cjs +218 -0
  69. package/dist/gmail-sync-hHm9gaWd.cjs.map +1 -0
  70. package/dist/gmail-sync-rQaVqKWd.js +214 -0
  71. package/dist/gmail-sync-rQaVqKWd.js.map +1 -0
  72. package/dist/gmail-webhook-handler-DS7OlRPX.js +3 -0
  73. package/dist/gmail-webhook-handler-e5Od25FX.js +97 -0
  74. package/dist/gmail-webhook-handler-e5Od25FX.js.map +1 -0
  75. package/dist/goal-engine-CUZSpERI.js +2 -0
  76. package/dist/goal-engine-KpBftn4V.js +295 -0
  77. package/dist/goal-engine-KpBftn4V.js.map +1 -0
  78. package/dist/google-drive-sync-DEPcqFca.js +105 -0
  79. package/dist/google-drive-sync-DEPcqFca.js.map +1 -0
  80. package/dist/hybrid-search-BmHttLrR.js +40 -0
  81. package/dist/hybrid-search-BmHttLrR.js.map +1 -0
  82. package/dist/hygiene-DZqfYpFf.js +38 -0
  83. package/dist/hygiene-DZqfYpFf.js.map +1 -0
  84. package/dist/identity-CI6olMNm.js +41 -0
  85. package/dist/identity-CI6olMNm.js.map +1 -0
  86. package/dist/identity-gyfWdrcX.js +2 -0
  87. package/dist/import-hubspot-BaK71U_K.js +588 -0
  88. package/dist/import-hubspot-BaK71U_K.js.map +1 -0
  89. package/dist/index-V8BFaH-b.d.ts +539 -0
  90. package/dist/index-V8BFaH-b.d.ts.map +1 -0
  91. package/dist/index-YqwMd6aQ.d.cts +538 -0
  92. package/dist/index-YqwMd6aQ.d.cts.map +1 -0
  93. package/dist/index.cjs +185 -0
  94. package/dist/index.cjs.map +1 -0
  95. package/dist/index.d.cts +538 -0
  96. package/dist/index.d.cts.map +1 -0
  97. package/dist/index.d.ts +539 -0
  98. package/dist/index.d.ts.map +1 -0
  99. package/dist/index.js +165 -0
  100. package/dist/index.js.map +1 -0
  101. package/dist/interactions-writer-CrPStUll.cjs +77 -0
  102. package/dist/interactions-writer-CrPStUll.cjs.map +1 -0
  103. package/dist/interactions-writer-DO3KcSR3.js +52 -0
  104. package/dist/interactions-writer-DO3KcSR3.js.map +1 -0
  105. package/dist/interactions-writer-SLHnoEeE.js +46 -0
  106. package/dist/interactions-writer-SLHnoEeE.js.map +1 -0
  107. package/dist/interactions-writer-dSPy1XfO.js +2 -0
  108. package/dist/knowledge-base-D0Fh40kc.js +1013 -0
  109. package/dist/knowledge-base-D0Fh40kc.js.map +1 -0
  110. package/dist/lancedb-CCBbpulq.js +2 -0
  111. package/dist/lancedb-rlvWoPwl.js +98 -0
  112. package/dist/lancedb-rlvWoPwl.js.map +1 -0
  113. package/dist/lead-model-BCFzyktm.js +109 -0
  114. package/dist/lead-model-BCFzyktm.js.map +1 -0
  115. package/dist/llm-DEjWcqmW.js +2 -0
  116. package/dist/llm-DvzZqva0.js +372 -0
  117. package/dist/llm-DvzZqva0.js.map +1 -0
  118. package/dist/llm-Z8RIYkpF.js +174 -0
  119. package/dist/llm-Z8RIYkpF.js.map +1 -0
  120. package/dist/llm-iijeXmgq.cjs +198 -0
  121. package/dist/llm-iijeXmgq.cjs.map +1 -0
  122. package/dist/mcp-CdTJWTJf.d.cts +12 -0
  123. package/dist/mcp-CdTJWTJf.d.cts.map +1 -0
  124. package/dist/mcp-CdTJWTJf.d.ts +12 -0
  125. package/dist/mcp-CdTJWTJf.d.ts.map +1 -0
  126. package/dist/mcp.cjs +7464 -0
  127. package/dist/mcp.cjs.map +1 -0
  128. package/dist/mcp.d.cts +12 -0
  129. package/dist/mcp.d.cts.map +1 -0
  130. package/dist/mcp.d.ts +12 -0
  131. package/dist/mcp.d.ts.map +1 -0
  132. package/dist/mcp.js +7448 -0
  133. package/dist/mcp.js.map +1 -0
  134. package/dist/memory-Bb6ky3kb.js +58 -0
  135. package/dist/memory-Bb6ky3kb.js.map +1 -0
  136. package/dist/memory-Cy6-Tbyl.js +2 -0
  137. package/dist/metrics-DH8wHvya.js +26 -0
  138. package/dist/metrics-DH8wHvya.js.map +1 -0
  139. package/dist/microsoft-auth-B8_S45gh.js +17 -0
  140. package/dist/microsoft-auth-B8_S45gh.js.map +1 -0
  141. package/dist/microsoft-calendar-B6MMtUQK.js +67 -0
  142. package/dist/microsoft-calendar-B6MMtUQK.js.map +1 -0
  143. package/dist/microsoft-sync-CpZVoSuq.js +68 -0
  144. package/dist/microsoft-sync-CpZVoSuq.js.map +1 -0
  145. package/dist/nba-3wanmJ0U.js +48 -0
  146. package/dist/nba-3wanmJ0U.js.map +1 -0
  147. package/dist/notification-dispatcher-0vYNngWe.js +97 -0
  148. package/dist/notification-dispatcher-0vYNngWe.js.map +1 -0
  149. package/dist/opportunity-score-BTMOQSTV.js +47 -0
  150. package/dist/opportunity-score-BTMOQSTV.js.map +1 -0
  151. package/dist/pipedrive-client-CdGKpH9b.js +17 -0
  152. package/dist/pipedrive-client-CdGKpH9b.js.map +1 -0
  153. package/dist/pipeline-writer-BqBrYrQc.js +2 -0
  154. package/dist/pipeline-writer-BvVquKIe.js +96 -0
  155. package/dist/pipeline-writer-BvVquKIe.js.map +1 -0
  156. package/dist/pipeline-writer-N2omexxp.cjs +121 -0
  157. package/dist/pipeline-writer-N2omexxp.cjs.map +1 -0
  158. package/dist/pipeline-writer-eufx_0o1.js +102 -0
  159. package/dist/pipeline-writer-eufx_0o1.js.map +1 -0
  160. package/dist/proactive-agent-BgQXw3ac.js +96 -0
  161. package/dist/proactive-agent-BgQXw3ac.js.map +1 -0
  162. package/dist/proactive-worker-BrLHNhjH.js +229 -0
  163. package/dist/proactive-worker-BrLHNhjH.js.map +1 -0
  164. package/dist/push-manager-CdqIIkuh.js +108 -0
  165. package/dist/push-manager-CdqIIkuh.js.map +1 -0
  166. package/dist/push-manager-CowY-0IK.js +2 -0
  167. package/dist/quote-generator-BfwENXzg.js +133 -0
  168. package/dist/quote-generator-BfwENXzg.js.map +1 -0
  169. package/dist/quote-generator-OhSFsi3x.js +2 -0
  170. package/dist/rbac-C7c8tcES.js +2 -0
  171. package/dist/rbac-CTIktZaC.js +91 -0
  172. package/dist/rbac-CTIktZaC.js.map +1 -0
  173. package/dist/relationship-health-odxEoQdJ.js +454 -0
  174. package/dist/relationship-health-odxEoQdJ.js.map +1 -0
  175. package/dist/revenue-simulation-BJdRTEHc.js +2 -0
  176. package/dist/revenue-simulation-Bqf2DLVB.js +251 -0
  177. package/dist/revenue-simulation-Bqf2DLVB.js.map +1 -0
  178. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  179. package/dist/salesforce-client-rhZFa_p5.js +51 -0
  180. package/dist/salesforce-client-rhZFa_p5.js.map +1 -0
  181. package/dist/segments-BqcD5HIl.js +61 -0
  182. package/dist/segments-BqcD5HIl.js.map +1 -0
  183. package/dist/sequence-engine-CCTHEBgi.js +2 -0
  184. package/dist/sequence-engine-J1lTW_in.js +91 -0
  185. package/dist/sequence-engine-J1lTW_in.js.map +1 -0
  186. package/dist/sequence-store-DaaWr0Os.js +221 -0
  187. package/dist/sequence-store-DaaWr0Os.js.map +1 -0
  188. package/dist/server-Dyva03K8.js +4287 -0
  189. package/dist/server-Dyva03K8.js.map +1 -0
  190. package/dist/session-B9AilxOE.js +81 -0
  191. package/dist/session-B9AilxOE.js.map +1 -0
  192. package/dist/session-D0qFkBla.cjs +82 -0
  193. package/dist/session-D0qFkBla.cjs.map +1 -0
  194. package/dist/session-D9ub6Wl1.js +79 -0
  195. package/dist/session-D9ub6Wl1.js.map +1 -0
  196. package/dist/session-mWHA71Lw.js +2 -0
  197. package/dist/session-store-B0QZE8Bx.cjs +697 -0
  198. package/dist/session-store-B0QZE8Bx.cjs.map +1 -0
  199. package/dist/session-store-C8tEvMPw.js +543 -0
  200. package/dist/session-store-C8tEvMPw.js.map +1 -0
  201. package/dist/session-store-CEa39Dxs.js +15 -0
  202. package/dist/session-store-CEa39Dxs.js.map +1 -0
  203. package/dist/sla-engine-5IhTsBUR.js +2 -0
  204. package/dist/sla-engine-BqX-7u-7.js +53 -0
  205. package/dist/sla-engine-BqX-7u-7.js.map +1 -0
  206. package/dist/sop-DkhVChGy.js +2 -0
  207. package/dist/sop-Vp0UPWFW.js +70 -0
  208. package/dist/sop-Vp0UPWFW.js.map +1 -0
  209. package/dist/survey-engine-C06hcQt3.js +2 -0
  210. package/dist/survey-engine-DBjCYqCv.js +147 -0
  211. package/dist/survey-engine-DBjCYqCv.js.map +1 -0
  212. package/dist/sync-state-ChaLbamC.js +33 -0
  213. package/dist/sync-state-ChaLbamC.js.map +1 -0
  214. package/dist/sync-state-CwLSt_1m.js +2 -0
  215. package/dist/ticket-writer-CjqKeIRD.js +2 -0
  216. package/dist/ticket-writer-j2oX_Wal.js +134 -0
  217. package/dist/ticket-writer-j2oX_Wal.js.map +1 -0
  218. package/dist/tone-Bdm5uaht.js +48 -0
  219. package/dist/tone-Bdm5uaht.js.map +1 -0
  220. package/dist/tone-DRKlZgPr.cjs +43 -0
  221. package/dist/tone-DRKlZgPr.cjs.map +1 -0
  222. package/dist/tone-vNb2DAAD.js +39 -0
  223. package/dist/tone-vNb2DAAD.js.map +1 -0
  224. package/dist/transcript-watcher-CL2QUygI.js +132 -0
  225. package/dist/transcript-watcher-CL2QUygI.js.map +1 -0
  226. package/dist/unmatched-transcripts-BsH5bhkU.js +26 -0
  227. package/dist/unmatched-transcripts-BsH5bhkU.js.map +1 -0
  228. package/dist/unmatched-transcripts-D0PrJ9iz.js +2 -0
  229. package/dist/update-deal-BNwPGaTV.js +2 -0
  230. package/dist/update-deal-DKC79skb.js +91 -0
  231. package/dist/update-deal-DKC79skb.js.map +1 -0
  232. package/dist/usage-CClTf5e6.cjs +57 -0
  233. package/dist/usage-CClTf5e6.cjs.map +1 -0
  234. package/dist/usage-D0-TYJkw.js +93 -0
  235. package/dist/usage-D0-TYJkw.js.map +1 -0
  236. package/dist/usage-D0u9a-lV.js +54 -0
  237. package/dist/usage-D0u9a-lV.js.map +1 -0
  238. package/dist/vault-C1D3zScD.js +2 -0
  239. package/dist/vault-DXCg29W-.js +86 -0
  240. package/dist/vault-DXCg29W-.js.map +1 -0
  241. package/dist/webhooks-7EpA05Qr.js +138 -0
  242. package/dist/webhooks-7EpA05Qr.js.map +1 -0
  243. package/dist/webhooks-BO2UAnmn.js +94 -0
  244. package/dist/webhooks-BO2UAnmn.js.map +1 -0
  245. package/dist/webhooks-Xn6zO6kd.cjs +97 -0
  246. package/dist/webhooks-Xn6zO6kd.cjs.map +1 -0
  247. package/dist/write-queue-BDolUxfs.cjs +26 -0
  248. package/dist/write-queue-BDolUxfs.cjs.map +1 -0
  249. package/dist/write-queue-IbsAjUnh.js +21 -0
  250. package/dist/write-queue-IbsAjUnh.js.map +1 -0
  251. package/package.json +142 -0
package/README.md ADDED
@@ -0,0 +1,767 @@
1
+ <div align="center">
2
+
3
+ # DatasynxOpenCRM&nbsp;ยท&nbsp;`dxcrm`
4
+
5
+ **Local-first, MCP-native CRM. One agent per customer. `npm install`.**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@datasynx/agentic-crm.svg?color=cb3837&logo=npm)](https://www.npmjs.com/package/@datasynx/agentic-crm)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@datasynx/agentic-crm.svg?color=cb3837)](https://www.npmjs.com/package/@datasynx/agentic-crm)
9
+ [![CI](https://github.com/datasynx-ai/datasynx-crm/actions/workflows/ci.yml/badge.svg)](https://github.com/datasynx-ai/datasynx-crm/actions/workflows/ci.yml)
10
+ [![Docs](https://github.com/datasynx-ai/datasynx-crm/actions/workflows/pages.yml/badge.svg)](https://datasynx-ai.github.io/datasynx-crm/)
11
+ [![license](https://img.shields.io/npm/l/@datasynx/agentic-crm.svg?color=3fb950)](./LICENSE)
12
+ [![node](https://img.shields.io/node/v/@datasynx/agentic-crm.svg)](https://nodejs.org)
13
+
14
+ [**๐Ÿ“– Documentation**](https://datasynx-ai.github.io/datasynx-crm/) ยท [**๐Ÿ“ฆ npm**](https://www.npmjs.com/package/@datasynx/agentic-crm) ยท [**๐Ÿ’ป GitHub**](https://github.com/datasynx-ai/datasynx-crm) ยท [**๐Ÿ’ผ LinkedIn**](https://de.linkedin.com/company/datasynx-ai)
15
+
16
+ </div>
17
+
18
+ > **You don't open a CRM to find your customer. Your customer's agent finds you โ€” briefed, current, and ready to act.**
19
+
20
+ DatasynxOpenCRM stores every customer as structured Markdown โ€” no database, no cloud lock-in โ€” and exposes it to any AI agent over the [Model Context Protocol](https://modelcontextprotocol.io). Your data lives on your machine; your agents read and write it natively in Claude Code, Codex, Cursor, and more.
21
+
22
+ ---
23
+
24
+ ## 5-Minute Quickstart
25
+
26
+ ```bash
27
+ npm install -g @datasynx/agentic-crm
28
+
29
+ # 1. Initialize (detects Claude Code, Codex, Cursor, Claude Desktop, ...)
30
+ dxcrm init
31
+
32
+ # 2. Create your first customer
33
+ dxcrm create "Acme Corp" --domain acme.com --email ceo@acme.com
34
+
35
+ # 3. Your AI agent can now answer:
36
+ # "Was ist los mit Acme Corp?" โ†’ <3 Sekunden Antwort
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Why DatasynxOpenCRM?
42
+
43
+ | Problem | HubSpot | dxcrm |
44
+ |---|---|---|
45
+ | Monthly cost | โ‚ฌ90โ€“900/seat | Free (self-hosted) |
46
+ | AI integration | Plugin/API only | Native MCP, works in Claude Code/Codex/Cursor |
47
+ | Data ownership | Their cloud | Your machine, your files |
48
+ | Offline access | No | Yes โ€” pure markdown |
49
+ | Privacy/GDPR | Complex | Full GDPR erasure built-in |
50
+ | Customization | Limited | Fork it, it's TypeScript |
51
+
52
+ ---
53
+
54
+ ## CLI Commands
55
+
56
+ ### Core
57
+
58
+ | Command | Description |
59
+ |---|---|
60
+ | `dxcrm init` | Initialize CRM, detect & configure all AI frameworks |
61
+ | `dxcrm create <name>` | Create new customer (`--domain`, `--email`) |
62
+ | `dxcrm list [--filter <q>]` | List all customers |
63
+ | `dxcrm validate` | Validate all customer data files |
64
+ | `dxcrm guide` | Full documentation in terminal |
65
+ | `dxcrm mcp docs` | MCP tool reference in terminal |
66
+
67
+ ### MCP Server
68
+
69
+ | Command | Description |
70
+ |---|---|
71
+ | `dxcrm mcp start` | Start MCP server (stdio mode, for Claude Code / Codex) |
72
+ | `dxcrm mcp start --http [--port 3847]` | Start MCP server in HTTP mode (for team sharing) |
73
+
74
+ ### Session Management
75
+
76
+ | Command | Description |
77
+ |---|---|
78
+ | `dxcrm session open <slug>` | Set active customer session |
79
+ | `dxcrm session close` | Clear active session |
80
+ | `dxcrm session status` | Show current session |
81
+
82
+ ### Sync
83
+
84
+ | Command | Description |
85
+ |---|---|
86
+ | `dxcrm sync <slug>` | Sync Gmail + transcripts for a customer |
87
+ | `dxcrm sync --provider microsoft` | Sync Outlook via Microsoft Graph API |
88
+ | `dxcrm sync --provider google-drive` | Sync Google Drive/Docs files |
89
+ | `dxcrm sync --provider teams-transcripts` | Sync Microsoft Teams transcripts |
90
+ | `dxcrm sync --provider google-meet` | Sync Google Meet transcripts |
91
+ | `dxcrm daemon start` | Start background sync daemon |
92
+ | `dxcrm daemon stop` | Stop daemon |
93
+ | `dxcrm daemon status` | Check daemon status |
94
+ | `dxcrm status` | Show daemon, sync state, customer counts |
95
+ | `dxcrm status --unmatched` | List unmatched transcript queue |
96
+
97
+ ### Import
98
+
99
+ | Command | Description |
100
+ |---|---|
101
+ | `dxcrm import <file>` | Import from CSV (`--from csv`, `--dry-run`) |
102
+ | `dxcrm import ./export/ --from hubspot` | Import HubSpot multi-file export directory |
103
+ | `dxcrm import ./export/ --from hubspot --analyze` | Pre-flight: counts, custom props, owners |
104
+ | `dxcrm import ./export/ --from hubspot --resume` | Resume interrupted import |
105
+ | `dxcrm import ./export/ --from hubspot --owner-map "alice@hs.com=alice"` | Map HubSpot owners to reps |
106
+ | `dxcrm import --from hubspot --mode api` | Import HubSpot via API (v4 Associations) |
107
+ | `dxcrm import --from salesforce --mode api` | Import Salesforce contacts + activities |
108
+ | `dxcrm import --from pipedrive --mode api` | Import Pipedrive persons + activities |
109
+
110
+ ### Agents
111
+
112
+ | Command | Description |
113
+ |---|---|
114
+ | `dxcrm agent spawn <slug>` | Spawn wake-triggered agent (Telegram on new email) |
115
+ | `dxcrm agent status` | Show all configured agents |
116
+ | `dxcrm agent remove <slug>` | Remove agent config |
117
+
118
+ ### Team / Server
119
+
120
+ | Command | Description |
121
+ |---|---|
122
+ | `dxcrm server start` | Start HTTP MCP server (`--data <dir>`, `--port 3847`) |
123
+ | `dxcrm server status` | Check if HTTP server is running |
124
+ | `dxcrm audit` | Show audit trail (`--slug`, `--actor`, `--limit`) |
125
+
126
+ ### Goals
127
+
128
+ | Command | Description |
129
+ |---|---|
130
+ | `dxcrm goal set "<description>" --deadline <date>` | Set a goal + get decomposed action plan |
131
+ | `dxcrm goal status` | Show all active goals with progress |
132
+ | `dxcrm goal update <goalId> --progress <n>` | Update goal progress (0โ€“100%) |
133
+ | `dxcrm goal cancel <goalId>` | Cancel an active goal |
134
+
135
+ ### Push Subscriptions (Real-Time Ingestion)
136
+
137
+ | Command | Description |
138
+ |---|---|
139
+ | `dxcrm push register <slug> --provider gmail --webhook-url <url>` | Register Gmail Pub/Sub push subscription |
140
+ | `dxcrm push register <slug> --provider microsoft-graph --webhook-url <url>` | Register MS Graph webhook |
141
+ | `dxcrm push register <slug> --provider slack --webhook-url <url> --team-id <id>` | Register Slack Events subscription |
142
+ | `dxcrm push status [--slug <slug>] [--provider <p>]` | Show all subscriptions with expiry |
143
+ | `dxcrm push revoke <id>` | Revoke a subscription |
144
+ | `dxcrm push renew --all` | Manually renew expiring subscriptions |
145
+
146
+ ### File Attachments
147
+
148
+ | Command | Description |
149
+ |---|---|
150
+ | `dxcrm attach <slug> <file>` | Attach a file to a customer (copies to `customers/<slug>/attachments/`) |
151
+
152
+ ```bash
153
+ dxcrm attach acme-corp ./proposals/acme-q2-2026.pdf
154
+ ```
155
+
156
+ ### Pipeline Stages
157
+
158
+ | Command | Description |
159
+ |---|---|
160
+ | `dxcrm stages list` | List all configured pipeline stages |
161
+ | `dxcrm stages set <id> <label> [--order N] [--probability N] [--color #hex] [--final]` | Create or update a stage |
162
+ | `dxcrm stages delete <id>` | Remove a stage |
163
+ | `dxcrm stages reset` | Reset to default stages |
164
+
165
+ ### Plugins
166
+
167
+ | Command | Description |
168
+ |---|---|
169
+ | `dxcrm plugin list` | List all registered plugins |
170
+ | `dxcrm plugin info <name>` | Show plugin details and exposed MCP tools |
171
+
172
+ **Built-in plugins:**
173
+
174
+ | Plugin | What it does |
175
+ |---|---|
176
+ | `slack` | Posts Slack notification after every interaction/deal update |
177
+ | `stripe` | Adds `get_stripe_context` MCP tool (revenue, subscriptions) |
178
+ | `linear` | Adds `get_linear_issues` MCP tool (linked issues per customer) |
179
+
180
+ ### Intelligence & Governance
181
+
182
+ | Command | Description |
183
+ |---|---|
184
+ | `dxcrm usage [--slug <slug>]` | Transparent per-customer LLM token costs |
185
+ | `dxcrm memory add\|list\|search` | Agent memories (per customer + global), hybrid-searchable |
186
+ | `dxcrm sop add\|list\|find` | Standard operating procedures (global/per customer) |
187
+ | `dxcrm tone set\|show` | Per-customer writing tonality (feeds `draft_email`) |
188
+ | `dxcrm hygiene scan` | Data-quality scan (missing/malformed/duplicate) |
189
+ | `dxcrm policy set <tool> <auto\|approve\|block>` | Human-in-the-loop approval policy |
190
+ | `dxcrm approvals list\|approve\|reject` | Review gated agent actions |
191
+ | `dxcrm autofill <file>` | Transcript โ†’ structured summary/next-steps/objections |
192
+ | `dxcrm ask "<question>" [--slug <slug>]` | Natural-language Q&A over your CRM |
193
+ | `dxcrm nba <slug>` | Next-best-action recommendations |
194
+ | `dxcrm churn assess <slug>` / `dxcrm churn scan` | Churn early-warning (relationship-health based) |
195
+ | `dxcrm leadscore train` / `dxcrm leadscore predict <slug>` | Predictive lead-scoring (learned on won/lost) |
196
+ | `dxcrm enrich <slug> [--write]` | Enrich customer facts (offline + plugins, vault-backed) |
197
+ | `dxcrm coach <file>` | Conversation intelligence (talk-ratio/objections/coaching) |
198
+ | `dxcrm vault set\|get\|list\|rm` | Local AES-256-GCM credential vault |
199
+ | `dxcrm compliance` | Governance posture (AI-Act Art.50, local-LLM, PII, guardrails) |
200
+
201
+ See [docs/cli-reference.md](./docs/cli-reference.md) and [docs/compliance.md](./docs/compliance.md) for full details.
202
+
203
+ ### Security & Compliance
204
+
205
+ | Command | Description |
206
+ |---|---|
207
+ | `dxcrm rbac set <actor> <role>` | Assign role (admin/manager/rep) |
208
+ | `dxcrm rbac show` | List configured roles |
209
+ | `dxcrm rbac check <actor> <tool>` | Check if actor can call a tool |
210
+ | `dxcrm gdpr erase <slug> [--confirm]` | GDPR erasure (dry-run without --confirm) |
211
+ | `dxcrm gdpr list-erasures` | Show erasure log |
212
+ | `dxcrm security-report [--output <file>]` | Generate Markdown security questionnaire |
213
+
214
+ ### Backup & Restore (Enterprise)
215
+
216
+ | Command | Description |
217
+ |---|---|
218
+ | `dxcrm backup [path]` | Backup `customers/` + `.agentic/` with SHA-256 manifest |
219
+ | `dxcrm backup --encrypt` | AES-256-GCM encrypted backup |
220
+ | `dxcrm backup --remote s3://bucket/path/` | Backup + upload to S3 |
221
+ | `dxcrm backup --remote rsync://host:/path/` | Backup + rsync to remote |
222
+ | `dxcrm backup verify <path>` | Verify backup integrity (unzip -t + manifest check) |
223
+ | `dxcrm backup drill <path>` | Restore-drill: verify a backup is actually restorable |
224
+ | `dxcrm backup list` | List all logged backups with size + verification status |
225
+ | `dxcrm backup schedule --every day --keep 7` | Daily backups, keep last 7 |
226
+ | `dxcrm backup schedule --every week --keep 4 --monthly 12` | Grandfathering retention |
227
+ | `dxcrm restore <path>` | Restore from backup |
228
+
229
+ ### Email Sequences (H1)
230
+
231
+ | Command | Description |
232
+ |---|---|
233
+ | `dxcrm sequence list` | List all sequences |
234
+ | `dxcrm sequence create <id> --name <name>` | Create a new sequence |
235
+ | `dxcrm sequence enroll <id> --slug <slug> --email <email>` | Enroll contact |
236
+ | `dxcrm sequence status` | Show active enrollments |
237
+ | `dxcrm sequence run` | Manually trigger daily send cycle |
238
+
239
+ ### Quotes (H4)
240
+
241
+ | Command | Description |
242
+ |---|---|
243
+ | `dxcrm quote generate --slug <slug> --deal <dealName>` | Generate HTML quote (Q-YYYY-NNN) |
244
+ | `dxcrm quote list [--slug <slug>]` | List all quotes |
245
+ | `dxcrm quote get <quoteNumber>` | Get quote details |
246
+
247
+ ### Tickets (H6)
248
+
249
+ | Command | Description |
250
+ |---|---|
251
+ | `dxcrm ticket list [--slug <slug>] [--status open] [--priority urgent]` | List tickets |
252
+ | `dxcrm ticket create <slug> --title <title> [--priority high]` | Open ticket with SLA |
253
+ | `dxcrm ticket update <slug> <ticketId> --status in-progress` | Update ticket |
254
+ | `dxcrm ticket close <slug> <ticketId> [--resolution <text>]` | Close ticket |
255
+
256
+ ### Surveys (H7)
257
+
258
+ | Command | Description |
259
+ |---|---|
260
+ | `dxcrm survey create <id> [--type nps\|csat\|ces]` | Create survey definition |
261
+ | `dxcrm survey send <surveyId> --slug <slug> --email <email>` | Generate survey token + email |
262
+ | `dxcrm survey results <surveyId> [--slug <slug>]` | Show NPS score + responses |
263
+
264
+ ### Knowledge Base (H8)
265
+
266
+ | Command | Description |
267
+ |---|---|
268
+ | `dxcrm kb list [--category <cat>] [--public]` | List KB articles |
269
+ | `dxcrm kb get <id>` | Get article body |
270
+ | `dxcrm kb search <query> [--public]` | Full-text search |
271
+ | `dxcrm kb create <id> --title <title> [--category <cat>]` | Create article |
272
+ | `dxcrm kb delete <id>` | Delete article |
273
+
274
+ ---
275
+
276
+ ## MCP Tools (56 tools for AI Agents)
277
+
278
+ These tools are available to any AI agent connected via MCP (Claude Code, Codex, Cursor, etc.):
279
+
280
+ | Tool | Description | RBAC |
281
+ |---|---|---|
282
+ | `get_capabilities` | Full tool list + CRM workflow guide | any |
283
+ | `get_active_session` | Current active customer session | any |
284
+ | `get_customer_context` | Complete customer brief (facts + interactions + pipeline) | any |
285
+ | `search_customer_knowledge` | Semantic search through customer history | any |
286
+ | `list_customers` | All customers with stage + deal value | any |
287
+ | `log_interaction` | Record call/email/meeting | rep+ |
288
+ | `update_deal` | Update pipeline deal stage/value | rep+ |
289
+ | `update_customer_facts` | Create or update customer profile (creates new customer if slug doesn't exist) | admin |
290
+ | `export_customer` | Export customer data as JSON/Markdown | any |
291
+ | `get_deal_health` | Score deal health (Aโ€“F, 0โ€“100) per deal | any |
292
+ | `get_pipeline_forecast` | Aggregate weighted pipeline revenue | any |
293
+ | `summarize_meeting` | Summarize transcript + log interaction | rep+ |
294
+ | `get_pipeline_stages` | List configured pipeline stages | any |
295
+ | `get_market_intelligence` | Search across all customers for patterns | any |
296
+ | `get_relationship_graph` | Stakeholder map + knowledge graph (champions, blockers, economic buyers) | any |
297
+ | `get_relationship_health` | Health score (0โ€“100, Aโ€“F) per contact, decay detection, recommendations | any |
298
+ | `run_deal_agent` | Analyze deal + generate action plan (observe/suggest/act modes) | rep+ |
299
+ | `approve_agent_action` | Approve or reject a queued deal agent action | rep+ |
300
+ | `simulate_revenue` | Monte Carlo pipeline forecast with P10/P50/P90 confidence intervals | any |
301
+ | `get_playbook` | Retrieve matching playbooks for a deal situation | any |
302
+ | `create_playbook` | Create or update a playbook with trigger DSL | rep+ |
303
+ | `list_playbooks` | List all playbooks for a customer | any |
304
+ | `distill_playbook` | LLM-extract reusable playbook from won/lost deal history | rep+ |
305
+ | `pursue_goal` | Set goal + decompose into prioritized deal action plan | manager+ |
306
+ | `get_goal_status` | Get active goals, progress, and sub-goal breakdown | any |
307
+ | `register_push_subscription` | Register real-time push subscription (Gmail/MS Graph/Slack) | admin |
308
+ | `get_push_status` | Show push subscriptions with expiry and event counts | any |
309
+ | `get_org_intelligence` | Stakeholder map: champions, buyers, blockers, health scores, risk flags | any |
310
+ | `open_deal_room` | Multi-agent deal brief: graph + health + simulation + playbook in one call | any |
311
+ | `get_proactive_briefing` | Daily briefing: urgent alerts, opportunities, P50/P90 forecast, top action | any |
312
+ | `list_email_templates` | List email templates by category (outreach/followup/support) | any |
313
+ | `get_email_template` | Get full template with variable placeholders | any |
314
+ | `draft_email` | Draft personalized email from template + customer facts | rep+ |
315
+ | `enroll_in_sequence` | Enroll contact in multi-step email sequence | rep+ |
316
+ | `list_sequence_enrollments` | List enrollments; filter by slug or status | any |
317
+ | `unenroll_from_sequence` | Pause an active enrollment | rep+ |
318
+ | `list_sequences` | List all sequences with step count + enrollment count | any |
319
+ | `generate_quote` | Create HTML quote with auto-numbering (Q-YYYY-NNN) | rep+ |
320
+ | `get_quote_status` | Get quote or list all quotes for a customer | any |
321
+ | `get_booking_link` | Get Calendly booking URL, optionally pre-filled with customer info | rep+ |
322
+ | `create_ticket` | Open support ticket with auto-SLA due date | rep+ |
323
+ | `update_ticket` | Update ticket status or assignee | rep+ |
324
+ | `list_tickets` | List tickets sorted by priority (cross-customer) | any |
325
+ | `close_ticket` | Close ticket and optionally log resolution as interaction | rep+ |
326
+ | `send_nps_survey` | Generate NPS survey token + HTML email body | rep+ |
327
+ | `get_survey_results` | NPS score, promoters/passives/detractors, all responses | any |
328
+ | `search_knowledge_base` | Full-text search across KB articles | any |
329
+ | `create_kb_article` | Create or update knowledge base article | rep+ |
330
+ | `backup_now` | Trigger immediate backup with manifest + integrity check | admin |
331
+ | `list_backups` | List backups with date, size, verification status | any |
332
+ | `trigger_sync` | Force immediate Gmail sync for one or all customers (bypasses 30-min daemon cycle) | rep+ |
333
+ | `get_audit_log` | Read append-only audit log โ€” filter by customer, actor, or limit | admin |
334
+
335
+ ### Tool Examples
336
+
337
+ ```json
338
+ // Get customer context before a meeting
339
+ get_customer_context({ "slug": "acme-corp" })
340
+
341
+ // Log a call after it ends
342
+ log_interaction({
343
+ "slug": "acme-corp",
344
+ "type": "Call",
345
+ "summary": "Discussed Q3 renewal. Budget confirmed at โ‚ฌ50k.",
346
+ "with": "Max Mรผller",
347
+ "nextSteps": ["Send proposal by Friday"],
348
+ "direction": "inbound"
349
+ })
350
+
351
+ // Update deal stage
352
+ update_deal({
353
+ "slug": "acme-corp",
354
+ "dealName": "Q3 Renewal",
355
+ "stage": "negotiation",
356
+ "value": 50000,
357
+ "probability": 75
358
+ })
359
+
360
+ // Search historical emails
361
+ search_customer_knowledge({
362
+ "slug": "acme-corp",
363
+ "query": "pricing negotiation budget"
364
+ })
365
+
366
+ // Run deal agent (suggest mode โ€” queues actions for review)
367
+ run_deal_agent({
368
+ "slug": "acme-corp",
369
+ "dealName": "Q3 Renewal",
370
+ "autonomyLevel": "suggest"
371
+ })
372
+
373
+ // Approve a queued agent action
374
+ approve_agent_action({
375
+ "slug": "acme-corp",
376
+ "actionId": "da_1748346900000_a3f7x2",
377
+ "approved": true
378
+ })
379
+
380
+ // Get matching playbook for a deal in negotiation
381
+ get_playbook({
382
+ "slug": "acme-corp",
383
+ "stage": "negotiation",
384
+ "value": 75000,
385
+ "daysSinceContact": 10
386
+ })
387
+
388
+ // Create a playbook from proven tactics
389
+ create_playbook({
390
+ "slug": "acme-corp",
391
+ "name": "enterprise-renewal",
392
+ "trigger": "deal_stage_negotiation AND value > 50000 AND days_stalled > 7",
393
+ "content": "# Enterprise Renewal\n\n## Steps\n1. Call economic buyer directly.",
394
+ "successRate": 0.73
395
+ })
396
+
397
+ // Extract playbook from a won deal
398
+ distill_playbook({
399
+ "slug": "acme-corp",
400
+ "dealName": "Q3 Enterprise License",
401
+ "outcome": "won"
402
+ })
403
+
404
+ // Set a revenue goal โ€” get decomposed action plan
405
+ pursue_goal({
406
+ "goal": "Close โ‚ฌ500k ARR this quarter",
407
+ "deadline": "2026-09-30",
408
+ "context": "Focus on existing pipeline"
409
+ })
410
+
411
+ // Check goal progress
412
+ get_goal_status()
413
+
414
+ // Register Gmail Pub/Sub push subscription (events arrive in <60s instead of 30min polling)
415
+ register_push_subscription({
416
+ "provider": "gmail",
417
+ "slug": "acme-corp",
418
+ "webhookUrl": "https://myserver.com/webhooks/gmail",
419
+ "gmailTopicName": "projects/my-project/topics/gmail-push"
420
+ })
421
+
422
+ // Check all active push subscriptions
423
+ get_push_status()
424
+ // โ†’ { subscriptions: [{ id, provider, slug, status, expiresInHours, needsRenewal, eventsProcessed }], summary: {...} }
425
+
426
+ // Stakeholder map: champions, buyers, blockers with health scores
427
+ get_org_intelligence({ "slug": "acme-corp" })
428
+ // โ†’ { slug, people: [{ name, role, healthScore, daysSinceContact, riskFlags }], missingRoles, riskAssessment, recommendation }
429
+
430
+ // Multi-agent deal brief (parallel orchestration of 6 sub-systems)
431
+ open_deal_room({ "slug": "acme-corp", "dealName": "Enterprise License 2026" })
432
+ // โ†’ { executiveSummary, topPriorities, riskScore, stakeholders, dealHealth, revenueSimulation, recommendedPlaybook }
433
+
434
+ // Proactive morning briefing (scans all customers automatically)
435
+ get_proactive_briefing()
436
+ // โ†’ { urgent: ["acme-corp: Sarah silent 45d"], opportunities: [...], forecast: "P50 โ‚ฌ287k", topAction: "..." }
437
+ ```
438
+
439
+ ---
440
+
441
+ ## Framework Integration
442
+
443
+ `dxcrm init` automatically registers the MCP server in all detected frameworks:
444
+
445
+ | Framework | Tier | Harness |
446
+ |---|---|---|
447
+ | Claude Code | 1 | CLAUDE.md + ~/.claude.json + .claude/settings.json |
448
+ | Codex CLI | 1 | AGENTS.md + ~/.codex/config.toml |
449
+ | Grok Build (xAI) | 1 | AGENTS.md + ~/.grok/user-settings.json + .grok/settings.json |
450
+ | OpenClaw | 1 | SOUL.md + AGENTS.md + TOOLS.md |
451
+ | Hermes Agent | 1 | SOUL.md + Skill |
452
+ | Antigravity CLI (`agy`) | 1 | GEMINI.md + AGENTS.md + SKILL.md |
453
+ | Cursor | 2 | `.cursor/rules/datasynx-crm.mdc` |
454
+ | Windsurf | 2 | MCP config only |
455
+ | Cline | 2 | MCP config only |
456
+ | Claude Desktop | 2 | MCP config only |
457
+
458
+ ---
459
+
460
+ ## Data Structure
461
+
462
+ ```
463
+ ~/.dxcrm/
464
+ โ”œโ”€โ”€ customers/
465
+ โ”‚ โ””โ”€โ”€ acme-corp/
466
+ โ”‚ โ”œโ”€โ”€ main_facts.md # Customer profile (YAML frontmatter)
467
+ โ”‚ โ”œโ”€โ”€ interactions.md # All calls/emails/meetings (newest first)
468
+ โ”‚ โ”œโ”€โ”€ pipeline.md # Deal stages
469
+ โ”‚ โ”œโ”€โ”€ sources.json # Gmail query, transcript paths
470
+ โ”‚ โ”œโ”€โ”€ attachments/
471
+ โ”‚ โ””โ”€โ”€ transcripts/
472
+ โ””โ”€โ”€ .agentic/
473
+ โ”œโ”€โ”€ config.json # CRM configuration
474
+ โ”œโ”€โ”€ sources.json # Global sync sources
475
+ โ”œโ”€โ”€ rbac.json # Role assignments
476
+ โ”œโ”€โ”€ audit.log # Append-only audit trail
477
+ โ”œโ”€โ”€ agents/ # Per-customer agent configs
478
+ โ””โ”€โ”€ server.pid # HTTP server PID (team mode)
479
+ ```
480
+
481
+ ### Customer Profile Schema (`main_facts.md`)
482
+
483
+ ```yaml
484
+ ---
485
+ name: Acme Corp
486
+ domain: acme.com
487
+ email: ceo@acme.com
488
+ phone: +49 89 12345678
489
+ industry: SaaS
490
+ primary_contact: Max Mรผller
491
+ relationship_stage: active # prospect | active | churned | paused
492
+ deal_value: 50000
493
+ tags: [enterprise, strategic]
494
+ created: 2026-01-15
495
+ updated: 2026-05-26
496
+ ---
497
+
498
+ ## Quick Reference
499
+ Key facts in 2-3 bullet points.
500
+
501
+ ## Contacts
502
+ - Max Mรผller (CEO) โ€” max@acme.com
503
+
504
+ ## Critical Context
505
+ Any blocking facts the agent must know before every conversation.
506
+
507
+ ## Open Questions
508
+ Outstanding items needing follow-up.
509
+ ```
510
+
511
+ ---
512
+
513
+ ## Security & Compliance
514
+
515
+ ```bash
516
+ # Role-Based Access Control
517
+ export DXCRM_ACTOR=alice
518
+ dxcrm rbac set alice admin # Roles: admin | manager | rep
519
+ dxcrm rbac show # List all configured roles
520
+ dxcrm rbac check alice update_deal # Check permission
521
+
522
+ # GDPR Erasure
523
+ dxcrm gdpr erase acme-corp # Dry-run (shows what would be deleted)
524
+ dxcrm gdpr erase acme-corp --confirm # Permanent deletion + audit entry
525
+ dxcrm gdpr list-erasures # Erasure history
526
+
527
+ # Security Questionnaire
528
+ dxcrm security-report # Print to terminal
529
+ dxcrm security-report --output sec-report.md # Write to file
530
+ ```
531
+
532
+ **RBAC roles:**
533
+ - `admin` โ€” full access: all tools including `update_customer_facts` and `export_customer`
534
+ - `manager` โ€” `log_interaction` + `update_deal` + all read tools
535
+ - `rep` โ€” `log_interaction` + `update_deal` + all read tools
536
+
537
+ ---
538
+
539
+ ## Sync Setup
540
+
541
+ ### Gmail
542
+
543
+ ```bash
544
+ dxcrm init # Sets up Gmail OAuth
545
+ dxcrm sync acme-corp # Sync emails for one customer
546
+ dxcrm daemon start # Background sync every 15 min
547
+ ```
548
+
549
+ ### Microsoft Outlook
550
+
551
+ Write token file, then sync:
552
+
553
+ ```bash
554
+ # Write token (from your OAuth app)
555
+ echo '{"accessToken":"<token>"}' > ~/.dxcrm/.agentic/microsoft-token.json
556
+
557
+ dxcrm sync --provider microsoft
558
+ ```
559
+
560
+ ### Salesforce Import
561
+
562
+ ```bash
563
+ dxcrm import --from salesforce --mode api \
564
+ --token <access_token> \
565
+ --url https://myco.salesforce.com
566
+ ```
567
+
568
+ Two-pass: contacts โ†’ customers, tasks โ†’ interactions (linked via WhoId).
569
+
570
+ ### Pipedrive Import
571
+
572
+ ```bash
573
+ dxcrm import --from pipedrive --mode api \
574
+ --token <api_token> \
575
+ --url https://myco.pipedrive.com
576
+ ```
577
+
578
+ Two-pass: persons โ†’ customers, activities โ†’ interactions.
579
+
580
+ ---
581
+
582
+ ## Agent Wake Notifications
583
+
584
+ Per-customer wake agents send a Telegram message whenever a new email arrives from that customer's domain. The daemon detects the new email during its sync cycle and calls `notifyAgentWake()` for all customers that have an agent configured.
585
+
586
+ ### Setup
587
+
588
+ ```bash
589
+ # 1. Export your Telegram credentials
590
+ export TELEGRAM_BOT_TOKEN=123456789:AAxxxxx
591
+ export TELEGRAM_CHAT_ID=987654321
592
+
593
+ # 2. Spawn a wake agent for a customer
594
+ dxcrm agent spawn acme-corp --channel telegram
595
+
596
+ # 3. (Optional) Use a different chat ID per customer
597
+ dxcrm agent spawn beta-gmbh --channel telegram --chat-id 111222333
598
+
599
+ # 4. Check all configured agents
600
+ dxcrm agent status
601
+
602
+ # 5. Remove an agent
603
+ dxcrm agent remove acme-corp
604
+ ```
605
+
606
+ ### How it works
607
+
608
+ 1. The background daemon syncs Gmail every 30 minutes (configurable via `DXCRM_DAEMON_INTERVAL`).
609
+ 2. On a new email from a customer domain, `notifyAgentWake()` is called.
610
+ 3. If an agent config exists for that customer (`.agentic/agents/<slug>.agent.json`), a Telegram message is sent to the configured `chatId` (or `TELEGRAM_CHAT_ID` env var).
611
+ 4. The message contains customer name, email subject, and a link to open the deal room.
612
+
613
+ ### Environment variables
614
+
615
+ | Variable | Required | Description |
616
+ |---|---|---|
617
+ | `TELEGRAM_BOT_TOKEN` | Yes (for agents) | Bot token from @BotFather |
618
+ | `TELEGRAM_CHAT_ID` | Yes (for agents) | Default chat ID for all agents |
619
+ | `DXCRM_DATA_DIR` | No | Override data directory (default: `~/.dxcrm`) |
620
+ | `DXCRM_ACTOR` | No | Set RBAC actor identity for audit trail |
621
+ | `DXCRM_SURVEY_SECRET` | No | HMAC secret for tamper-proof survey tokens |
622
+ | `ANTHROPIC_API_KEY` | No | Enables LLM features (summarize_meeting, distill_playbook, run_deal_agent). Falls back gracefully to rule-based analysis. |
623
+
624
+ ---
625
+
626
+ ## Team Setup
627
+
628
+ Run on a shared VM โ€” all team members share one data directory:
629
+
630
+ ```bash
631
+ # On the VM
632
+ dxcrm server start --data /mnt/crm-data --port 3847
633
+ ```
634
+
635
+ Each team member's framework config:
636
+
637
+ ```json
638
+ {
639
+ "mcpServers": {
640
+ "datasynx-opencrm": {
641
+ "url": "http://vm-ip:3847/mcp"
642
+ }
643
+ }
644
+ }
645
+ ```
646
+
647
+ Set actor identity per session:
648
+ ```bash
649
+ export DXCRM_ACTOR=alice
650
+ ```
651
+
652
+ ---
653
+
654
+ ## Manual MCP Configuration
655
+
656
+ ### Claude Code
657
+
658
+ ```json
659
+ // ~/.claude.json
660
+ {
661
+ "mcpServers": {
662
+ "datasynx-opencrm": {
663
+ "type": "stdio",
664
+ "command": "node",
665
+ "args": ["/path/to/node_modules/@datasynx/agentic-crm/dist/mcp.js"]
666
+ }
667
+ }
668
+ }
669
+ ```
670
+
671
+ ### Grok Build (xAI)
672
+
673
+ ```json
674
+ // ~/.grok/user-settings.json
675
+ // NOTE: Grok uses an ARRAY for mcpServers (not an object/map like Claude)
676
+ {
677
+ "mcpServers": [
678
+ {
679
+ "name": "datasynx-opencrm",
680
+ "transport": {
681
+ "type": "stdio",
682
+ "command": "node",
683
+ "args": ["/path/to/node_modules/@datasynx/agentic-crm/dist/mcp.js"],
684
+ "env": { "DXCRM_DATA_DIR": "/path/to/your/.dxcrm" }
685
+ }
686
+ }
687
+ ]
688
+ }
689
+ ```
690
+
691
+ Run `grok inspect` to verify the server is discovered. Grok Build reads `AGENTS.md` and `CLAUDE.md` natively โ€” both are written by `dxcrm init`.
692
+
693
+ ### Claude Desktop
694
+
695
+ ```json
696
+ // macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
697
+ // Windows: %APPDATA%\Claude\claude_desktop_config.json
698
+ // Linux: ~/.config/claude-desktop/claude_desktop_config.json
699
+ {
700
+ "mcpServers": {
701
+ "datasynx-opencrm": {
702
+ "command": "node",
703
+ "args": ["/path/to/node_modules/@datasynx/agentic-crm/dist/mcp.js"]
704
+ }
705
+ }
706
+ }
707
+ ```
708
+
709
+ ### Cursor / Windsurf / Cline
710
+
711
+ Use the HTTP server URL after `dxcrm mcp start --http`:
712
+
713
+ ```
714
+ http://localhost:3847/mcp
715
+ ```
716
+
717
+ ---
718
+
719
+ ## Development
720
+
721
+ ```bash
722
+ git clone https://github.com/datasynx-ai/datasynx-crm
723
+ cd datasynx-crm
724
+ npm install
725
+ npm test # All tests (Vitest, TDD)
726
+ npm run build # tsdown โ†’ dist/
727
+ npm run typecheck # TypeScript strict check
728
+ ```
729
+
730
+ ### Running Tests
731
+
732
+ ```bash
733
+ npm test # All tests
734
+ npm test -- --run src/__tests__ # Unit tests only
735
+ npm test -- --run __tests__/e2e # E2E tests only
736
+ npm test -- --reporter verbose # Verbose output
737
+ ```
738
+
739
+ ---
740
+
741
+ ## Docs
742
+
743
+ ๐Ÿ“– **Full documentation site:** [datasynx-ai.github.io/datasynx-crm](https://datasynx-ai.github.io/datasynx-crm/)
744
+
745
+ - [Quickstart โ€” Real Gmail (5 min)](./docs/quickstart-real.md)
746
+ - [CLI Reference](./docs/cli-reference.md)
747
+ - [MCP Tools](./docs/mcp-tools.md)
748
+ - [Schemas](./docs/schemas.md)
749
+ - [Framework Integrations](./docs/integrations.md)
750
+ - [Deployment](./docs/deployment.md)
751
+ - [Team Setup](./docs/team-setup.md)
752
+
753
+ ---
754
+
755
+ ## Community & Links
756
+
757
+ - ๐Ÿ“ฆ **npm:** [@datasynx/agentic-crm](https://www.npmjs.com/package/@datasynx/agentic-crm)
758
+ - ๐Ÿ’ป **GitHub:** [datasynx-ai/datasynx-crm](https://github.com/datasynx-ai/datasynx-crm)
759
+ - ๐Ÿ› **Issues:** [Report a bug or request a feature](https://github.com/datasynx-ai/datasynx-crm/issues)
760
+ - ๐Ÿ’ผ **LinkedIn:** [Datasynx AI](https://de.linkedin.com/company/datasynx-ai)
761
+ - ๐Ÿ“„ **License:** [MIT](./LICENSE)
762
+
763
+ ---
764
+
765
+ <div align="center">
766
+ <sub>Built with TypeScript ยท Powered by the Model Context Protocol ยท ยฉ 2026 Datasynx</sub>
767
+ </div>