NexNex

Organizational context & memory for AI agents. Connect 100+ tools into one knowledge graph via 47 MCP tools.

Nex: Intelligence Layer for AI Agents

npm version Discord

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.

Supports Claude Code, OpenClaw, Cursor, Windsurf, Codex, Aider, Continue, Zed, and more. Adds context from Email, Meetings, Slack, HubSpot, Salesforce.

Join our Discord

Talk to the team, share feedback, and connect with other developers building AI agents with Nex.

Quick Start

Install

# 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 (or bun/pnpm) — thin shim that delegates to nex-cli
npm install -g @nex-ai/nex

Sign up and configure

# Create an account (or log in if you already have one)
nex register --email [email protected]

# Auto-detect your AI platforms and install hooks, MCP, slash commands
nex setup

nex setup detects your platforms (Claude Code, Cursor, Windsurf, etc.), installs hooks, scans project files, and writes config. After setup:

nex ask "who is Maria Rodriguez?"
nex remember "Met with Maria, CTO of TechFlow. European expansion Q3, $2M budget."

Skills & Platform Rules

The core of this repo is a set of skills, slash commands, and agent instructions that teach any AI platform how to use Nex.

Slash Commands (plugin-commands/)

Drop these .md files into your agent's commands directory to get Nex slash commands:

CommandWhat it does
/nex:recall <query>Search your knowledge base
/nex:remember <text>Store information for later recall
/nex:entities <query>Find people, companies, topics
/nex:scan <dir>Scan project files into Nex
/nex:integrate <provider>Connect an OAuth integration
/nex:register <email>One-time account registration
/nex:notifyCheck recent notifications

For Claude Code: cp plugin-commands/*.md ~/.claude/commands/

Platform Rules (platform-rules/)

Pre-written agent instructions that teach each platform how to use Nex tools. Copy the relevant file into your editor's config:

PlatformFileDestination
Cursorcursor-rules.md.cursor/rules/
Windsurfwindsurf-rules.md.windsurf/rules/
GitHub Copilotvscode-instructions.md.github/instructions/
Zedzed-rules.md.zed/rules/
Aideraider-conventions.md.aider/conventions/
Clinecline-rules.md.cline/rules/
Continuecontinue-rules.md.continue/rules/
KiloCodekilocode-rules.md.kilocode/rules/
Codexcodex-agents.md.codex/agents/
OpenCodeopencode-agents.md.opencode/agents/

Platform Plugins (platform-plugins/)

Deeper integrations for editors that support plugin APIs:

  • Continue (continue-provider.ts) — Nex as a context provider for autocomplete
  • OpenCode (opencode-plugin.ts) — Session lifecycle hooks for context preservation
  • KiloCode (kilocode-modes.yaml) — Nex memory mode definitions
  • Windsurf (windsurf-workflows/) — Native workflow definitions for ask, remember, search, notify

Plugins

Claude Code Plugin

Full auto-recall and auto-capture via Claude Code hooks. Queries Nex before each prompt and captures conversation facts after each response.

cd claude-code-plugin && bun install && bun run build

Then add hooks to ~/.claude/settings.json (see settings.json for the template) and register the MCP server:

cp claude-code-plugin/commands/*.md ~/.claude/commands/
claude mcp add nex -- nex-mcp

The fastest path is just nex setup — it does all of this automatically.

See claude-code-plugin/README.md for details.

OpenClaw Plugin

15+ tools, auto-recall, and auto-capture for OpenClaw agents.

cp -r openclaw-plugin /path/to/openclaw/plugins/nex
cd /path/to/openclaw/plugins/nex && bun install && bun run build

Add to openclaw.json:

{
  "plugins": {
    "load": { "paths": ["/path/to/plugins/nex"] },
    "slots": { "memory": "nex" },
    "entries": {
      "nex": {
        "enabled": true,
        "config": { "apiKey": "sk-your_key_here" }
      }
    }
  }
}

See openclaw-plugin/README.md for details.

MCP Server (Claude Desktop, Cursor, Windsurf)

{
  "mcpServers": {
    "nex": {
      "command": "nex-mcp",
      "env": { "NEX_API_KEY": "sk-your_key_here" }
    }
  }
}

Or without a global install:

{
  "mcpServers": {
    "nex": {
      "command": "npx",
      "args": ["-y", "@nex-ai/nex", "mcp"],
      "env": { "NEX_API_KEY": "sk-your_key_here" }
    }
  }
}

Remote MCP Server (no install required)

Connect directly to the hosted Nex MCP server. No local installation needed — works with any MCP client that supports Streamable HTTP transport.

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

Get an API key at app.nex.ai/settings/developers.

Shell-only Agents (no Node.js)

Bash scripts for agents that can only run shell commands. Requires curl and jq.

bash scripts/nex-openclaw-register.sh [email protected] "Your Name"
printf '{"query":"who is Maria?"}' | bash scripts/nex-api.sh POST /v1/context/ask
bash scripts/nex-scan-files.sh --dir . --max-files 10

Copy-Paste Bootstrap Prompt

Drop this into any terminal-capable AI agent to bootstrap Nex end-to-end:

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

1. If the `nex` CLI is missing, install it globally with `npm install -g @nex-ai/nex`.
2. If Nex is not authenticated yet, ask me for the email address I want to use for registration, then continue. If Nex is already authenticated, reuse the existing account and key.
3. Run `nex setup` and complete the full install flow for every detected AI coding platform in this environment.
4. After setup, inspect integrations and connect the first available unconnected integration. Prefer this order when multiple choices are available: gmail, google-calendar, slack, salesforce, hubspot, attio, outlook, outlook-calendar. If OAuth is required, open the browser flow and wait for it to complete.
5. Run a fresh file scan for the current directory so the workspace is up to date.
6. After the scan finishes, trigger Nex compounding jobs by calling the authenticated `POST https://app.nex.ai/api/developers/v1/compounding/trigger` endpoint for these job types: `consolidation`, `pattern_detection`, and `playbook_synthesis`. Use the active Nex API key from the current environment or the config written by Nex setup.
7. Fetch the last 24 hours of insights with the insights endpoint or `nex insight list --last 24h`, then give me a clean digest with sections for Highlights, Risks, Opportunities, Open Loops, and Recommended Next Actions.
8. Finish by showing me:
   - what Nex installed
   - which integration was connected
   - how many files were scanned and ingested
   - whether the compounding/playbooks trigger succeeded
   - the formatted 24-hour insight digest

Do not stop after partial setup. Only pause if you need my email for registration or if an OAuth flow requires my interaction.

Development

Repo structure

bin/                    # Thin Node.js shims that delegate to nex-cli
claude-code-plugin/     # Claude Code hooks (auto-recall, auto-capture)
openclaw-plugin/        # OpenClaw plugin (15+ tools, auto-recall, auto-capture)
plugin-commands/        # Slash command definitions (.md files)
platform-rules/         # Agent instructions for 10 platforms
platform-plugins/       # Editor integrations (Continue, OpenCode, KiloCode, Windsurf)
scripts/                # Bash API wrappers for shell-only agents
server.json             # MCP Registry manifest

Build and test

# Shims (syntax check only)
npm test

# Claude Code plugin
cd claude-code-plugin && bun install && bun run build && bun test

# OpenClaw plugin
cd openclaw-plugin && bun install && bun run build && bun test

How it works

npm package (bin/nex.js, bin/nex-mcp.js): Thin Node.js shims that find nex-cli on PATH or common install locations and delegate all commands. For npx @nex-ai/nex and MCP Registry compatibility.

The nex-cli binary is built and released from nex-crm/nex-cli. Install it with:

curl -fsSL https://raw.githubusercontent.com/nex-crm/nex-as-a-skill/main/install.sh | sh

CI/CD

  • CI (ci.yml): Validates shims, builds + tests both plugins
  • Publish (publish-cli.yml): Auto-publishes to npm on push to main
  • MCP Registry (publish-mcp.yml): Publishes server.json to the MCP Registry on version tags

Environment Variables

VariableRequiredDefault
NEX_API_KEYYes (or register)
NEX_DEV_URLNo (dev only)https://app.nex.ai
NEX_SCAN_ENABLEDNotrue
NEX_SCAN_MAX_FILESNo5
NEX_SCAN_DEPTHNo20
NEX_NOTIFY_INTERVAL_MINUTESNo15

Architecture

graph TD
    API["Nex Context Graph<br/><i>app.nex.ai API</i>"]
    CLI["nex-cli binary"]

    API --- CLI

    NEX["nex binary / npm shim"]
    MCP["MCP Server<br/><i>nex-mcp</i>"]
    OC["OpenClaw Plugin"]
    CC["Claude Code Plugin"]

    CLI --- NEX
    CLI --- MCP
    CLI --- OC
    CLI --- CC

    NEX -.- T1["Any terminal"]
    MCP -.- T2["Claude Desktop · Cursor<br/>Windsurf · ChatGPT"]
    OC -.- T3["OpenClaw agents"]
    CC -.- T4["Claude Code"]

License

MIT

Server Terkait

NotebookLM Web Importer

Impor halaman web dan video YouTube ke NotebookLM dengan satu klik. Dipercaya oleh 200.000+ pengguna.

Instal Ekstensi Chrome