@nex-ai/nex 0.1.27 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,14 @@
1
- # @nex-ai/nex
1
+ # Nex: Compounding Intelligence for AI agents
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@nex-ai/nex)](https://www.npmjs.com/package/@nex-ai/nex)
4
4
  [![GitHub](https://img.shields.io/badge/github-nex--crm%2Fnex--as--a--skill-blue)](https://github.com/nex-crm/nex-as-a-skill)
5
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?logo=discord&logoColor=white)](https://discord.gg/gjSySC3PzV)
5
6
 
6
- Nex CLI provides organizational context & memory to AI agents across 12 platforms.
7
+ Turn all your AI agent conversations into a unified knowledge graph. Supports Claude Code, Codex, OpenClaw, Cursor, OpenCode, etc. Adds additional context from Email, Meetings, Slack, HubSpot, Salesforce.
8
+
9
+ <a href="https://discord.gg/gjSySC3PzV"><img src="https://img.shields.io/badge/Join%20our%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord" /></a>
10
+
11
+ Talk to the team, share feedback, and connect with other developers building AI agents with Nex.
7
12
 
8
13
  **GitHub**: [github.com/nex-crm/nex-as-a-skill](https://github.com/nex-crm/nex-as-a-skill)
9
14
 
@@ -11,7 +16,7 @@ Nex CLI provides organizational context & memory to AI agents across 12 platform
11
16
 
12
17
  ```bash
13
18
  # Install globally
14
- npm install -g @nex-ai/nex
19
+ bun install -g @nex-ai/nex
15
20
 
16
21
  # Or run directly (no install)
17
22
  npx @nex-ai/nex ask "who is Maria?"
@@ -99,7 +104,7 @@ nex graph # Open the workspace graph in your browser
99
104
  - Creates `.nex.toml` project config with commented defaults
100
105
  - Syncs API key to `~/.nex-mcp.json` (shared config)
101
106
 
102
- **Single install**: `npm install -g @nex-ai/nex` bundles everything — hooks, adapters, platform plugins, slash commands, rules, and MCP server. No separate packages needed.
107
+ **Single install**: `bun install -g @nex-ai/nex` bundles everything — hooks, adapters, platform plugins, slash commands, rules, and MCP server. No separate packages needed.
103
108
 
104
109
  **Integration hierarchy** (per platform): Hooks > Custom plugins > Custom agents/modes > Workflows > Rules > MCP. Each platform gets every layer it supports.
105
110
 
@@ -252,9 +257,9 @@ git diff | nex capture
252
257
  ## Development
253
258
 
254
259
  ```bash
255
- npm install
256
- npm run build # TypeScript → dist/
257
- npm run dev # Run with tsx (no build)
258
- npm test # Unit tests
260
+ bun install
261
+ bun run build # TypeScript → dist/
262
+ bun run dev # Run TS directly (no build)
263
+ bun test # Unit + integration tests
259
264
  NEX_DEV_URL=http://localhost:30000 nex ask "test" # Local API
260
265
  ```
@@ -9,6 +9,10 @@ export interface NexRecallResult {
9
9
  }
10
10
  /**
11
11
  * Format a Nex /ask response as an XML block for context injection.
12
+ *
13
+ * The preamble tells the AI to use the context naturally — not as a
14
+ * direct answer, but as background knowledge that informs the response.
15
+ * This makes proactive context feel seamless rather than forced.
12
16
  */
13
17
  export declare function formatNexContext(result: NexRecallResult): string;
14
18
  /**
@@ -6,6 +6,10 @@ const OPEN_TAG = "<nex-context>";
6
6
  const CLOSE_TAG = "</nex-context>";
7
7
  /**
8
8
  * Format a Nex /ask response as an XML block for context injection.
9
+ *
10
+ * The preamble tells the AI to use the context naturally — not as a
11
+ * direct answer, but as background knowledge that informs the response.
12
+ * This makes proactive context feel seamless rather than forced.
9
13
  */
10
14
  export function formatNexContext(result) {
11
15
  const parts = [
@@ -1 +1 @@
1
- {"version":3,"file":"context-format.js","sourceRoot":"","sources":["../../src/plugin/context-format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,QAAQ,GAAG,eAAe,CAAC;AACjC,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAQnC;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAuB;IACtD,MAAM,KAAK,GAAa;QACtB,QAAQ;QACR,2IAA2I;KAC5I,CAAC;IAEF,IA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;IAEtB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,+BAA+B;IAC/B,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,uCAAuC,EAAE,EAAE,CAAC,CAAC;IACvE,8DAA8D;IAC9D,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IACrD,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC"}
@@ -1,10 +1,13 @@
1
1
  /**
2
- * Smart prompt classifier for selective recall.
2
+ * Proactive recall filter surfaces knowledge graph context on every meaningful prompt.
3
3
  *
4
- * Determines whether a prompt is likely knowledge-seeking (needs recall)
5
- * or a pure coding directive (skip recall). Also handles debounce
6
- * skips recall if a successful recall happened within the debounce window,
7
- * unless the current prompt contains question words.
4
+ * Philosophy: err heavily on the side of recalling. The moments where context
5
+ * feels most "magical" are when the user DIDN'T ask for it they're fixing a
6
+ * migration, deploying a service, or refactoring code, and suddenly relevant
7
+ * insights, patterns, or entity context from their knowledge graph appears.
8
+ *
9
+ * Only skip on truly trivial inputs (confirmations, single words) or explicit opt-out.
10
+ * Debounce prevents hammering the API on rapid-fire prompts.
8
11
  *
9
12
  * Persistence: last-recall timestamp stored in ~/.nex/recall-state.json
10
13
  */
@@ -19,5 +22,11 @@ export interface RecallDecision {
19
22
  export declare function recordRecall(sessionId?: string): void;
20
23
  /**
21
24
  * Determine whether this prompt should trigger a Nex /ask recall.
25
+ *
26
+ * Default: ALWAYS recall. Only skip on:
27
+ * - Explicit opt-out (prompt starts with !)
28
+ * - Trivial confirmations (yes, ok, done, lgtm)
29
+ * - Very short inputs (< 10 chars)
30
+ * - Debounce (< 10s since last recall, unless first prompt)
22
31
  */
23
32
  export declare function shouldRecall(prompt: string, isFirstPrompt: boolean): RecallDecision;
@@ -1,10 +1,13 @@
1
1
  /**
2
- * Smart prompt classifier for selective recall.
2
+ * Proactive recall filter surfaces knowledge graph context on every meaningful prompt.
3
3
  *
4
- * Determines whether a prompt is likely knowledge-seeking (needs recall)
5
- * or a pure coding directive (skip recall). Also handles debounce
6
- * skips recall if a successful recall happened within the debounce window,
7
- * unless the current prompt contains question words.
4
+ * Philosophy: err heavily on the side of recalling. The moments where context
5
+ * feels most "magical" are when the user DIDN'T ask for it they're fixing a
6
+ * migration, deploying a service, or refactoring code, and suddenly relevant
7
+ * insights, patterns, or entity context from their knowledge graph appears.
8
+ *
9
+ * Only skip on truly trivial inputs (confirmations, single words) or explicit opt-out.
10
+ * Debounce prevents hammering the API on rapid-fire prompts.
8
11
  *
9
12
  * Persistence: last-recall timestamp stored in ~/.nex/recall-state.json
10
13
  */
@@ -13,18 +16,9 @@ import { join } from "node:path";
13
16
  import { homedir } from "node:os";
14
17
  const DATA_DIR = join(homedir(), ".nex");
15
18
  const STATE_FILE = join(DATA_DIR, "recall-state.json");
16
- const DEBOUNCE_MS = 30_000; // 30 seconds
17
- // --- Question words that signal knowledge-seeking intent ---
18
- const QUESTION_WORDS = /\b(who|what|when|where|why|how|which|tell|explain|describe|summarize|summarise|list|find|show|get|any|does|did|is|are|was|were|have|has|do|can|could|should|would|will)\b/i;
19
- // --- Tool/action commands that are pure coding directives ---
20
- const TOOL_COMMANDS = /^\s*(run|build|test|lint|format|deploy|install|uninstall|start|stop|restart|commit|push|pull|merge|rebase|checkout|fetch|init|fix|refactor|rename|move|delete|remove|add|create|update|upgrade|downgrade|migrate|generate|scaffold|compile|bundle|watch|serve|debug|profile|bench|clean|reset|undo|redo|revert|squash|cherry-pick|tag|release|publish|npm|npx|yarn|pnpm|bun|pip|cargo|go|make|docker|kubectl|terraform|git|gh|cd|ls|cat|grep|find|mkdir|rm|cp|mv|touch|echo|export|source|chmod|chown|curl|wget|ssh|scp)\b/i;
21
- // --- File reference pattern (paths, extensions) ---
22
- const FILE_REF = /(?:[\w./\\-]+\.\w{1,10}|src\/|lib\/|dist\/|node_modules\/|\.\/|\.\.\/)/;
23
- // --- Code-heavy: >50% non-alpha characters (brackets, operators, etc.) ---
24
- function isCodeHeavy(text) {
25
- const alpha = text.replace(/[^a-zA-Z]/g, "").length;
26
- return alpha < text.length * 0.5;
27
- }
19
+ const DEBOUNCE_MS = 10_000; // 10 seconds
20
+ // --- Trivial inputs that never benefit from context ---
21
+ const TRIVIAL = /^\s*(y(es)?|no?|ok(ay)?|sure|done|thanks?|k|lgtm|approved?|merge|ship\s*it|looks?\s*good|\+1|👍)\s*[.!?]*\s*$/i;
28
22
  function readState() {
29
23
  try {
30
24
  const raw = readFileSync(STATE_FILE, "utf-8");
@@ -52,6 +46,12 @@ export function recordRecall(sessionId) {
52
46
  }
53
47
  /**
54
48
  * Determine whether this prompt should trigger a Nex /ask recall.
49
+ *
50
+ * Default: ALWAYS recall. Only skip on:
51
+ * - Explicit opt-out (prompt starts with !)
52
+ * - Trivial confirmations (yes, ok, done, lgtm)
53
+ * - Very short inputs (< 10 chars)
54
+ * - Debounce (< 10s since last recall, unless first prompt)
55
55
  */
56
56
  export function shouldRecall(prompt, isFirstPrompt) {
57
57
  const trimmed = prompt.trim();
@@ -63,32 +63,20 @@ export function shouldRecall(prompt, isFirstPrompt) {
63
63
  if (trimmed.startsWith("!")) {
64
64
  return { shouldRecall: false, reason: "opt-out" };
65
65
  }
66
- // Too short — likely a directive like "yes", "ok", "done"
67
- if (trimmed.length < 15) {
68
- return { shouldRecall: false, reason: "too-short" };
66
+ // Trivial confirmations
67
+ if (TRIVIAL.test(trimmed)) {
68
+ return { shouldRecall: false, reason: "trivial" };
69
69
  }
70
- // Has question words likely knowledge-seeking
71
- const hasQuestion = QUESTION_WORDS.test(trimmed);
72
- // Check debounce: skip if recent successful recall, unless question
73
- if (!hasQuestion) {
74
- const state = readState();
75
- if (state.lastRecallAt > 0 && Date.now() - state.lastRecallAt < DEBOUNCE_MS) {
76
- return { shouldRecall: false, reason: "debounce" };
77
- }
78
- }
79
- // Tool/action commands — pure coding directives
80
- if (TOOL_COMMANDS.test(trimmed) && !hasQuestion) {
81
- return { shouldRecall: false, reason: "tool-command" };
82
- }
83
- // Code-heavy with file references and no question words
84
- if (isCodeHeavy(trimmed) && FILE_REF.test(trimmed) && !hasQuestion) {
85
- return { shouldRecall: false, reason: "code-prompt" };
70
+ // Too short to be meaningful
71
+ if (trimmed.length < 10) {
72
+ return { shouldRecall: false, reason: "too-short" };
86
73
  }
87
- // Has question words always recall
88
- if (hasQuestion) {
89
- return { shouldRecall: true, reason: "question" };
74
+ // Debounce: skip if recent successful recall
75
+ const state = readState();
76
+ if (state.lastRecallAt > 0 && Date.now() - state.lastRecallAt < DEBOUNCE_MS) {
77
+ return { shouldRecall: false, reason: "debounce" };
90
78
  }
91
- // Default: recall (err on the side of providing context)
92
- return { shouldRecall: true, reason: "default" };
79
+ // Default: always recall proactive context is the goal
80
+ return { shouldRecall: true, reason: "proactive" };
93
81
  }
94
82
  //# sourceMappingURL=recall-filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recall-filter.js","sourceRoot":"","sources":["../../src/plugin/recall-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;AACzC,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AACvD,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,aAAa;AAEzC,8DAA8D;AAC9D,MAAM,cAAc,GAAG,4KAA4K,CAAC;AAEpM,+DAA+D;AAC/D,MAAM,aAAa,GAAG,6fAA6f,CAAC;AAEphB,qDAAqD;AACrD,MAA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organizational context & memory to AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,12 +15,13 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "build": "tsc",
18
- "start": "node dist/index.js",
19
- "dev": "tsx src/index.ts",
20
- "test": "node --import tsx --test tests/**/*.test.ts tests/**/**/*.test.ts",
21
- "prepublishOnly": "npm run build"
18
+ "start": "bun dist/index.js",
19
+ "dev": "bun src/index.ts",
20
+ "test": "bun test",
21
+ "prepublishOnly": "bun run build"
22
22
  },
23
23
  "devDependencies": {
24
+ "@types/bun": "latest",
24
25
  "@types/node": "^22.0.0",
25
26
  "@types/react": "^18.3.18",
26
27
  "ink-testing-library": "^4.0.0",
@@ -1,8 +1,6 @@
1
- # --- Nex Context & Memory ---
2
-
3
1
  # Nex — Organizational Context & Memory
4
2
 
5
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
6
4
 
7
5
  ## MCP Tools Available
8
6
 
@@ -24,15 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
24
22
  ### `nex_connect_integration` — Connect a data source
25
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
26
24
 
27
- ## When to Use Nex
25
+ ## Proactive Context
28
26
 
29
- When the user asks about:
30
- - **People or companies** — contacts, relationships, org charts
31
- - **Deals or opportunities** — status, history, next steps
32
- - **Meetings or calls** — past conversations, upcoming schedules
33
- - **Emails or messages** — communication history
34
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
35
28
 
36
- Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
29
+ - **Entity insights** facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
37
36
 
38
- # --- End Nex ---
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
45
+
46
+ Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,6 +1,6 @@
1
1
  # Nex — Organizational Context & Memory
2
2
 
3
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
4
4
 
5
5
  ## MCP Tools Available
6
6
 
@@ -22,13 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
22
22
  ### `nex_connect_integration` — Connect a data source
23
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
24
24
 
25
- ## When to Use Nex
25
+ ## Proactive Context
26
26
 
27
- When the user asks about:
28
- - **People or companies** — contacts, relationships, org charts
29
- - **Deals or opportunities** — status, history, next steps
30
- - **Meetings or calls** — past conversations, upcoming schedules
31
- - **Emails or messages** — communication history
32
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
28
+
29
+ - **Entity insights** — facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
36
+
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
33
45
 
34
46
  Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,6 +1,6 @@
1
1
  # Nex — Organizational Context & Memory
2
2
 
3
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
4
4
 
5
5
  ## MCP Tools Available
6
6
 
@@ -22,13 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
22
22
  ### `nex_connect_integration` — Connect a data source
23
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
24
24
 
25
- ## When to Use Nex
25
+ ## Proactive Context
26
26
 
27
- When the user asks about:
28
- - **People or companies** — contacts, relationships, org charts
29
- - **Deals or opportunities** — status, history, next steps
30
- - **Meetings or calls** — past conversations, upcoming schedules
31
- - **Emails or messages** — communication history
32
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
28
+
29
+ - **Entity insights** — facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
36
+
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
33
45
 
34
46
  Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,6 +1,6 @@
1
1
  # Nex — Organizational Context & Memory
2
2
 
3
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
4
4
 
5
5
  ## MCP Tools Available
6
6
 
@@ -22,13 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
22
22
  ### `nex_connect_integration` — Connect a data source
23
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
24
24
 
25
- ## When to Use Nex
25
+ ## Proactive Context
26
26
 
27
- When the user asks about:
28
- - **People or companies** — contacts, relationships, org charts
29
- - **Deals or opportunities** — status, history, next steps
30
- - **Meetings or calls** — past conversations, upcoming schedules
31
- - **Emails or messages** — communication history
32
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
28
+
29
+ - **Entity insights** — facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
36
+
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
33
45
 
34
46
  Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,6 +1,6 @@
1
1
  # Nex — Organizational Context & Memory
2
2
 
3
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
4
4
 
5
5
  ## MCP Tools Available
6
6
 
@@ -22,13 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
22
22
  ### `nex_connect_integration` — Connect a data source
23
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
24
24
 
25
- ## When to Use Nex
25
+ ## Proactive Context
26
26
 
27
- When the user asks about:
28
- - **People or companies** — contacts, relationships, org charts
29
- - **Deals or opportunities** — status, history, next steps
30
- - **Meetings or calls** — past conversations, upcoming schedules
31
- - **Emails or messages** — communication history
32
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
28
+
29
+ - **Entity insights** — facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
36
+
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
33
45
 
34
46
  Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,8 +1,6 @@
1
- # --- Nex Context & Memory ---
2
-
3
1
  # Nex — Organizational Context & Memory
4
2
 
5
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
6
4
 
7
5
  ## MCP Tools Available
8
6
 
@@ -24,15 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
24
22
  ### `nex_connect_integration` — Connect a data source
25
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
26
24
 
27
- ## When to Use Nex
25
+ ## Proactive Context
28
26
 
29
- When the user asks about:
30
- - **People or companies** — contacts, relationships, org charts
31
- - **Deals or opportunities** — status, history, next steps
32
- - **Meetings or calls** — past conversations, upcoming schedules
33
- - **Emails or messages** — communication history
34
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
35
28
 
36
- Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
29
+ - **Entity insights** facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
37
36
 
38
- # --- End Nex ---
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
45
+
46
+ Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,10 +1,6 @@
1
- ---
2
- applyTo: "**"
3
- ---
4
-
5
1
  # Nex — Organizational Context & Memory
6
2
 
7
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
8
4
 
9
5
  ## MCP Tools Available
10
6
 
@@ -26,13 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
26
22
  ### `nex_connect_integration` — Connect a data source
27
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
28
24
 
29
- ## When to Use Nex
25
+ ## Proactive Context
26
+
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
28
+
29
+ - **Entity insights** — facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
36
+
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
30
41
 
31
- When the user asks about:
32
- - **People or companies** contacts, relationships, org charts
33
- - **Deals or opportunities** status, history, next steps
34
- - **Meetings or calls** — past conversations, upcoming schedules
35
- - **Emails or messages** — communication history
36
- - **Organizational context** — company knowledge, team notes, decisions
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
37
45
 
38
46
  Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,6 +1,6 @@
1
1
  # Nex — Organizational Context & Memory
2
2
 
3
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
4
4
 
5
5
  ## MCP Tools Available
6
6
 
@@ -22,13 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
22
22
  ### `nex_connect_integration` — Connect a data source
23
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
24
24
 
25
- ## When to Use Nex
25
+ ## Proactive Context
26
26
 
27
- When the user asks about:
28
- - **People or companies** — contacts, relationships, org charts
29
- - **Deals or opportunities** — status, history, next steps
30
- - **Meetings or calls** — past conversations, upcoming schedules
31
- - **Emails or messages** — communication history
32
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
28
+
29
+ - **Entity insights** — facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
36
+
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
33
45
 
34
46
  Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
@@ -1,8 +1,6 @@
1
- # --- Nex Context & Memory ---
2
-
3
1
  # Nex — Organizational Context & Memory
4
2
 
5
- Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, and more — via MCP tools.
3
+ Nex provides your AI agent with real-time organizational knowledge — contacts, deals, meetings, emails, notes, insights, patterns, and playbooks — via MCP tools. Context is proactively injected into your conversation, so relevant knowledge surfaces automatically even when you don't ask for it.
6
4
 
7
5
  ## MCP Tools Available
8
6
 
@@ -24,15 +22,25 @@ Shows which integrations (Gmail, Slack, Calendar, CRM) are connected and active.
24
22
  ### `nex_connect_integration` — Connect a data source
25
23
  Initiate OAuth connection for Gmail, Google Calendar, Outlook, Slack, Salesforce, HubSpot, or Attio.
26
24
 
27
- ## When to Use Nex
25
+ ## Proactive Context
28
26
 
29
- When the user asks about:
30
- - **People or companies** — contacts, relationships, org charts
31
- - **Deals or opportunities** — status, history, next steps
32
- - **Meetings or calls** — past conversations, upcoming schedules
33
- - **Emails or messages** — communication history
34
- - **Organizational context** — company knowledge, team notes, decisions
27
+ Nex automatically surfaces relevant context from the user's knowledge graph on every prompt — not just questions. When you see a `<nex-context>` block, use it naturally to inform your response:
35
28
 
36
- Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.
29
+ - **Entity insights** facts about people, companies, and deals mentioned or relevant to the task
30
+ - **Knowledge insights** — patterns, lessons learned, and domain knowledge from past work
31
+ - **Playbook rules** — proven approaches and best practices from the user's experience
32
+
33
+ Leverage this context to provide more informed, personalized responses. If the context mentions a relevant pattern or past decision, incorporate it naturally without explicitly referencing the context block.
34
+
35
+ ## When to Use Nex Tools Directly
37
36
 
38
- # --- End Nex ---
37
+ Use `nex_ask` proactively when:
38
+ - The user mentions a person, company, or project — look up their context
39
+ - The task involves a domain the knowledge graph may have insights on
40
+ - You need organizational context to make a better recommendation
41
+
42
+ Use `nex_remember` when:
43
+ - The user shares a decision, preference, or important fact worth persisting
44
+ - A conversation reveals new knowledge that future sessions should have access to
45
+
46
+ Always try `nex_ask` first for general queries. Use `nex_search` when you need to find a specific record by name.