Skip to content
/

Nex

nex-as-skill · nex-crm/nex-as-a-skill · ★ 44 · last commit 2026-05-18

Primitive shape 11 total
Commands 7 Hooks 3 MCP tools 1
00

Summary

Nex — Summary

Nex is a cloud-backed knowledge graph ("organizational memory") that turns AI agent conversations into a unified, searchable context store accessible from any AI platform. It ships a nex-cli binary (npm package @nex-ai/nex, v0.2.11), an MCP server (nex-mcp), a Claude Code plugin with 3 lifecycle hooks, 7 slash commands, and platform rules/plugins for 15+ editors (Cursor, Windsurf, Zed, GitHub Copilot, Aider, Continue, Cline, Codex, OpenCode, KiloCode, Windsurf Workflows). The Claude Code plugin auto-recalls relevant knowledge before each user prompt (UserPromptSubmit hook), auto-captures session facts after each response (Stop hook), and primes session state at start (SessionStart hook). Nex integrates with real-world data sources — Email, Meetings, Slack, HubSpot, Salesforce — via OAuth, building an entity-based knowledge graph that persists across tools and sessions.

Compared to seeds: closest to ccmemory (MCP-anchored, cloud-backed knowledge store) but dramatically broader — Nex spans 15+ AI platforms, integrates external SaaS data sources, and ships a dedicated CLI binary with nex setup auto-detection. Unlike ccmemory's local Neo4j graph, Nex's storage is cloud-hosted at app.nex.ai (requires account + API key), making it a commercial SaaS product rather than a self-hosted tool.

01

Overview

Nex — Origin & Philosophy

Origin

Created by the nex-crm organization (9 contributors). Published on npm as @nex-ai/nex v0.2.11. TypeScript codebase. No explicit license file in root (license: none as detected by GitHub).

Philosophy

"Nex turns AI agent conversations into a unified knowledge graph. Tell something to one agent, recall it from any other. Context follows you across tools — no copy-pasting, no re-explaining."

The core value proposition is cross-tool persistence: unlike session-scoped or project-scoped memory, Nex maintains a unified knowledge graph that works identically whether the user is in Claude Code, Cursor, Windsurf, Codex, Aider, or any other supported platform.

A second axis: real-world data integration. Nex isn't just agent-conversation memory — it pulls context from Email, Meetings, Slack, HubSpot, and Salesforce via OAuth, building entity-based knowledge (people, companies, projects, decisions) rather than just conversation snippets.

Model

Nex uses a knowledge graph model (not a flat key-value store):

  • Entities: people, companies, topics, projects
  • Relationships: who worked on what, what decisions were made, when meetings happened
  • Queries: nex ask "who is Maria Rodriguez?" returns entity-aware answers

Install Philosophy

"Auto-detect your AI platforms and install hooks, MCP, slash commands." nex setup detects platforms, installs hooks, scans project files, writes config — one command.

Supported Platforms

Claude Code, OpenClaw, Cursor, Windsurf, Codex, Aider, Continue, Zed, GitHub Copilot, KiloCode, OpenCode, and more.

02

Architecture

Nex — Architecture

Distribution

  • Type: npm package + CLI binary + MCP server + Claude Code plugin + platform rules
  • npm: @nex-ai/nex v0.2.11
  • License: none (proprietary / CLA-based)
  • Backend: Cloud-hosted at app.nex.ai / api.nex.ai — requires account and API key

Install Methods

# Option A: install the nex-cli binary (no Node.js required)
curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-as-a-skill/main/install.sh | sh

# Option B: install via npm
npm install -g @nex-ai/nex

# Remote MCP (no install required)
# Connect to https://mcp.nex.ai/mcp with Authorization: Bearer <key>

Setup

nex register --email you@company.com
nex setup   # Auto-detects platforms, installs hooks, scans project, writes config

Required Runtime

  • Node.js (for npm install) or pre-built nex-cli binary
  • Network access to api.nex.ai (cloud backend)
  • Nex account + API key (sk-...)

Directory Structure

nex-as-a-skill/
├── bin/
│   ├── nex.js         # Main CLI entry point
│   └── nex-mcp.js     # MCP server entry point
├── plugin-commands/   # 7 slash command .md files
├── platform-rules/    # 15 platform-specific rule files
├── platform-plugins/  # Deep integrations (Continue, OpenCode, KiloCode, Windsurf)
├── claude-code-plugin/
│   ├── src/           # TypeScript source (18 modules)
│   ├── settings.json  # Hook configuration template
│   └── commands/      # Claude Code commands
├── openclaw-plugin/   # OpenClaw integration
├── scripts/           # Bash utility scripts for shell-only agents
└── .mcp.json          # MCP server config

Backend

Cloud-hosted knowledge graph at api.nex.ai. OAuth integrations available for:

  • Email (Google/Outlook)
  • Meetings (Zoom, Calendar)
  • Slack
  • HubSpot
  • Salesforce

Target AI Tools

Claude Code, Cursor, Windsurf, Codex, Aider, Continue, Zed, GitHub Copilot, KiloCode, OpenCode, OpenClaw, and shell-only agents via bash scripts.

03

Components

Nex — Components

CLI Binary

Binary Purpose
nex Main CLI: register, setup, ask, remember, scan
nex-mcp MCP server entry point

Slash Commands / Plugin Commands (7)

Command Purpose
/nex:recall <query> Search knowledge base via mcp__nex__context_ask tool
/nex:remember <text> Store text via mcp__nex__context_add_text tool
/nex:entities <query> Find people, companies, topics
/nex:scan <dir> Scan project files into Nex knowledge base
/nex:integrate <provider> Connect OAuth integration (Slack, HubSpot, etc.)
/nex:register <email> One-time account registration
/nex:notify Check recent notifications

Claude Code Hooks (3)

Event Script Purpose
SessionStart auto-session-start.js Prime session state with relevant knowledge
UserPromptSubmit auto-recall.js Auto-recall relevant memories before each prompt (8s timeout)
Stop auto-capture.js Auto-capture session facts after each response (async, 10s timeout)

MCP Server Tools

The nex-mcp server exposes tools including:

  • context_ask — query knowledge base
  • context_add_text — store text
  • Additional tools for entity management (exact count unknown without running server)

Platform Rules (15 platforms)

One .md file per platform teaching the agent how to use Nex tools:

  • cursor-rules.md, windsurf-rules.md, vscode-instructions.md
  • zed-rules.md, aider-conventions.md, cline-rules.md
  • continue-rules.md, kilocode-rules.md, codex-agents.md
  • opencode-agents.md

Platform Plugins (4 deep integrations)

Plugin Format
continue-provider.ts Context provider for autocomplete
opencode-plugin.ts Session lifecycle hooks
kilocode-modes.yaml Memory mode definitions
windsurf-workflows/ Native workflow definitions

Claude Code Plugin Source Modules (18)

auto-capture.ts, auto-recall-worker.ts, auto-recall.ts, auto-register.ts, auto-scan.ts, auto-session-start.ts, capture-filter.ts, config.ts, context-files.ts, context-format.ts, file-manifest.ts, file-scanner.ts, nex-client.ts, rate-limiter.ts, recall-cache.ts, recall-filter.ts, session-store.ts, workspace-data-dir.ts

Bash Scripts (shell-only agents)

Script Purpose
scripts/nex-openclaw-register.sh Register account via curl
scripts/nex-api.sh Call Nex API endpoints
scripts/nex-scan-files.sh Scan files without Node.js
05

Prompts

Nex — Prompt Files (Verbatim Excerpts)

Excerpt 1: /nex:recall Command

Source: plugin-commands/nex:recall.md

Prompting technique: Direct MCP tool delegation — the command is a one-line instruction that maps the user's query argument to a specific MCP tool call. Minimal prompt, maximum delegation to the backend.

---
description: Recall relevant memories from Nex knowledge base
---
Search the nex knowledge base for: $ARGUMENTS
Use the mcp__nex__context_ask tool to query and return formatted results with sources.

Excerpt 2: /nex:remember Command

Source: plugin-commands/nex:remember.md

Prompting technique: Direct MCP tool delegation — stores text through a specific MCP tool with confirmation.

---
description: Store information in Nex knowledge base
---
Use the mcp__nex__context_add_text tool to store the following text: $ARGUMENTS
Confirm what was stored.

Excerpt 3: Auto-Recall Hook — UserPromptSubmit Handler

Source: claude-code-plugin/src/auto-recall.ts (TypeScript, not a prompt file, but defines the injection behavior)

Prompting technique: Automatic context injection — the hook outputs { additionalContext: "..." } which Claude Code injects into the conversation context before the LLM processes the user's prompt. Uses a shouldRecall() filter to avoid unnecessary API calls.

/**
 * Claude Code UserPromptSubmit hook — auto-recall from Nex.
 *
 * Reads the user's prompt from stdin, runs it through the recall filter
 * to decide if recall is needed, queries Nex for relevant context,
 * and outputs { additionalContext: "..." } to inject into the conversation.
 *
 * On ANY error: outputs {} and exits 0 (graceful degradation).
 */
const FAST_RECALL_BUDGET_MS = readTimeoutEnv("NEX_RECALL_SYNC_BUDGET_MS", 8_000);
const BACKGROUND_RECALL_TIMEOUT_MS = readTimeoutEnv("NEX_RECALL_BACKGROUND_TIMEOUT_MS", 60_000);

Excerpt 4: Bootstrap Prompt (Copy-Paste for New Agents)

Source: README.md

Prompting technique: Self-bootstrapping prompt — designed to be dropped into any terminal-capable AI agent, enabling one-shot Nex setup without the user knowing the install steps.

Install and fully bootstrap Nex in this project from start to finish.

(The README provides a longer version that specifies every step, but this is the compact form.)

09

Uniqueness

Nex — Uniqueness & Positioning

differs_from_seeds

Nex is closest to ccmemory (cloud-backed MCP memory for AI agents) but is dramatically broader in scope. Unlike ccmemory which requires self-hosted Neo4j and targets only Claude Code, Nex is a commercial SaaS product with cloud infrastructure, OAuth integrations with 5+ external services, and support for 15+ AI platforms. Nex's knowledge graph is entity-aware (people, companies, projects) rather than conversation-chunk-based. The UserPromptSubmit hook that auto-recalls context before every prompt is more aggressive than any seed framework's auto-recall mechanism. Unlike superpowers or spec-driver (behavioral frameworks), Nex is pure memory infrastructure — it changes what the agent knows, not how it thinks or codes.

Positioning

Nex is the most enterprise-oriented framework in this batch. Its integration with CRM systems (HubSpot, Salesforce), communication tools (Slack), and calendaring (Meetings) positions it for teams rather than individual developers. The platform-rules approach (one rules file per editor) is the most systematic cross-platform memory strategy in the corpus.

Observable Failure Modes

  • Cloud lock-in: If api.nex.ai is down, all memory operations fail (graceful degradation returns {}). No local fallback.
  • Account requirement: Unlike every other framework in this batch, Nex requires account registration and an API key. One-time friction that blocks zero-setup use.
  • No license: The GitHub repo has no license file. Usage rights are unclear for commercial deployments.
  • Recall filter false negatives: The shouldRecall() filter decides when to skip knowledge lookup. Over-aggressive filtering could miss relevant context silently.
  • 8s UserPromptSubmit timeout: On slow connections or large knowledge graphs, the 8s budget may expire before context is injected, falling back to no recall.

Cross-References

  • Competes with: ccmemory (same problem, different scale)
  • Much broader than: nemp-memory, memoryagent, rlm-claude
04

Workflow

Nex — Workflow

Phase 1: Install & Register

curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-as-a-skill/main/install.sh | sh
nex register --email you@company.com
nex setup   # Auto-detects platforms, installs hooks, scans project

Artifact: API key configured, hooks installed in ~/.claude/settings.json, MCP server registered, project files scanned into knowledge base

Phase 2: Active Session — Auto-Recall

Every user prompt triggers auto-recall.js (UserPromptSubmit hook):

  1. Reads user prompt from stdin
  2. shouldRecall() filter decides if knowledge lookup is warranted
  3. Queries Nex API for relevant context
  4. Outputs { additionalContext: "..." } injected into conversation

8-second synchronous budget; background recall continues up to 60s.

Artifact: Knowledge context injected before LLM sees the prompt

Phase 3: Session End — Auto-Capture

When conversation stops, auto-capture.js (Stop hook, async) captures facts from the session and stores them in the Nex knowledge graph.

Artifact: New knowledge entries in cloud knowledge base

Phase 4: Manual Operations

nex ask "who is Maria Rodriguez?"
nex remember "Met with Maria, CTO of TechFlow. European expansion Q3, $2M budget."
/nex:scan ./src
/nex:integrate slack

Phase 5: Cross-Platform Access

The same knowledge is accessible from any configured platform — Cursor, Windsurf, Codex, etc. — without copying or re-explaining.

Approval Gates

None — all operations are automatic via hooks or manual via commands.

Artifacts Summary

Artifact Location
Knowledge graph Cloud at api.nex.ai
Session cache Local recall-cache (TTL-based)
Config ~/.claude/settings.json
06

Memory Context

Nex — Memory & Context

Storage Model

Cloud-hosted knowledge graph. All data stored at api.nex.ai. Requires Nex account and API key (sk-...). No local data store for knowledge (local session cache exists as TTL cache).

Memory Type

Entity-based knowledge graph:

  • Entities: people, companies, topics, projects, decisions
  • Relationships: connected facts (who worked on what, meeting outcomes, decisions)
  • Not a flat key-value store or conversation log

mcp__nex__context_ask tool — natural language query against the knowledge graph. Returns entities, facts, and sources. The nex ask "who is Maria Rodriguez?" pattern demonstrates entity-aware retrieval.

Cross-Session Handoff

Yes — cloud persistence means knowledge is available in any session, on any platform, without session-start actions. The SessionStart hook primes session state with relevant recent knowledge.

Cross-Tool Portability

High — the same knowledge graph is accessible from all 15+ supported platforms via MCP protocol or bash scripts. This is the primary design goal.

Auto-Capture

The Stop hook asynchronously captures facts from each conversation and adds them to the knowledge graph — progressive knowledge accumulation without manual user action.

External Data Sources (via OAuth)

  • Email (Google/Outlook)
  • Meetings (Zoom, Calendar)
  • Slack workspace
  • HubSpot CRM
  • Salesforce CRM

These augment the agent-conversation memory with real organizational context.

Local Cache

recall-cache.ts implements a TTL-based local cache:

  • Ready cache TTL: 5 minutes (configurable via NEX_RECALL_READY_TTL_MS)
  • Pending cache TTL: BACKGROUND_RECALL_TIMEOUT_MS + 30s

Prevents redundant API calls for repeated queries within a session.

State Files

File Purpose
Cloud knowledge graph All persistent knowledge
Local recall cache Session-scoped TTL cache (in-memory)
~/.claude/settings.json Hook configuration
07

Orchestration

Nex — Orchestration

Multi-Agent

No — Nex is a memory substrate for agents, not an orchestrator. The OpenClaw plugin documents 15+ tools suggesting some agent-coordination primitives, but the core product is knowledge graph access, not multi-agent orchestration.

Orchestration Pattern

none — Nex is called by agents, not calling them.

Execution Mode

event-driven — hooks fire on SessionStart, UserPromptSubmit, and Stop lifecycle events.

Isolation Mechanism

none

Multi-Model

No

Consensus Mechanism

None.

Crash Recovery

Yes (graceful degradation) — the auto-recall hook explicitly handles all errors by outputting {} and exiting 0, ensuring Nex failures never break the conversation.

Streaming Output

No

Cross-Tool Portability

High — by design, the same knowledge is accessible from all 15+ supported platforms.

08

Ui Cli Surface

Nex — UI & CLI Surface

Dedicated CLI Binary

Yes.

Binary Installed via
nex npm install -g @nex-ai/nex or install.sh
nex-mcp Same package

Key CLI Subcommands

Subcommand Purpose
nex register Create account
nex setup Auto-detect platforms, install hooks, scan project
nex ask Query knowledge base
nex remember Store information
nex mcp Start MCP server

nex setup is a wizard that handles the entire configuration. Binary is NOT a thin wrapper — it delegates to a pre-compiled nex-cli native binary with the npm package as a shim.

Local Web Dashboard

Unknownapp.nex.ai provides a web interface but this is cloud-hosted, not local. No local dashboard documented.

MCP Server

Remote Streamable HTTP endpoint available at https://mcp.nex.ai/mcp for zero-install access:

{
  "mcpServers": {
    "nex": {
      "url": "https://mcp.nex.ai/mcp",
      "headers": { "Authorization": "Bearer sk-..." }
    }
  }
}

Slash Commands (in Claude Code)

7 commands: /nex:recall, /nex:remember, /nex:entities, /nex:scan, /nex:integrate, /nex:register, /nex:notify

IDE Integration

  • Claude Code: Full plugin with 3 hooks + 7 commands
  • Cursor: cursor-rules.md + hooks config
  • Windsurf: rules + native workflow definitions
  • VS Code Copilot: instructions + hooks config
  • Continue: context provider for autocomplete
  • KiloCode: memory mode YAML definitions
  • Codex: agents config
  • Zed, Aider, Cline, OpenCode: rules files

Observability

  • nex ask for querying what's in the graph
  • Rate limiter in rate-limiter.ts (prevents API flooding)
  • Graceful degradation on all hook failures (logs errors, never breaks conversation)

Related frameworks

same archetype · same primary tool · same memory type

MemPalace ★ 53k

Verbatim local-first AI memory with 96.6% R@5 retrieval on LongMemEval using zero API calls — structured into a palace hierarchy…

Beads (Yegge) ★ 24k

Dolt-powered distributed graph issue tracker where AI agents track tasks with hierarchical IDs and dependency edges, claim work…

deepagents (LangChain) ★ 23k

Opinionated Python agent harness on top of LangGraph with sub-agents, filesystem, memory, and context compaction bundled in

agentmemory ★ 18k

Persistent, searchable memory for AI coding agents that captures every tool interaction, compresses it via LLM, and injects…

Open Multi-Agent ★ 6.3k

Give a natural-language goal to a coordinator agent and get a dynamically decomposed, parallelized task DAG executed by…

Basic Memory ★ 3.1k

Gives AI agents a persistent, human-readable knowledge graph of project decisions, observations, and relations stored as plain…