Nex SDK Documentation

Version Production 1.0 · Last Updated Jan 6, 2026

Nex SDK Documentation

Overview

The Nex SDK gives developers access to Nex's cognitive layer: memory, reasoning, and governance.

Current Status: Production (Launched January 6, 2026)
Early Access: Join Waitlist

API Status

Production Ready (Launched Jan 6, 2026)

All four core APIs are live and tested:

  • Memory Graph API - Query persistent context (99.9% uptime)
  • Boardroom API - Governance approval system (99.9% uptime)
  • PDAR Thinking API - Reasoning traces (99.9% uptime)
  • HEART API - Emotional intelligence (99.9% uptime)

Performance:

  • Response time: <200ms (average)
  • Capacity: 1,000+ requests/minute
  • Concurrency: 100+ simultaneous users
  • Success rate: 99.57% under stress

Testing:

  • 14-point validation suite ✅
  • Stress tested with 100 concurrent users ✅
  • Edge case coverage ✅

Ready for production use.


Getting Your API Key

Request early access: /sdk-waitlist

You'll receive your API key via email when approved. Keys look like: nex_sk_c8f3a9b2e1d4f5a6b7c8d9e0f1a2b3c4

[!WARNING] Keep your key secret. Never commit it to Git or expose it in client-side code.


Quick Start

1. Make Your First API Call

curl -X POST https://nex-ai-os.onrender.com/sdk/v1/memory/query      -H "Authorization: Bearer YOUR_API_KEY"      -H "Content-Type: application/json"      -d '{
       "user_id": "user_123",
       "context": "project_alpha",
       "query": "What are the latest system requirements?"
     }'

2. Using the SDK Client (Coming Soon)

Once SDK client libraries are available, the same call becomes simpler:

JavaScript/TypeScript:

import NexSDK from '@nex/sdk';

const nex = new NexSDK({
  apiKey: process.env.NEX_SECRET_KEY
});

const memory = await nex.memory.query({
  userId: 'user_xyz',
  context: 'user_preferences',
  query: 'email_tone'
});

console.log(memory.nodes);

Python:

from nex import NexSDK

nex = NexSDK(api_key=os.environ['NEX_SECRET_KEY'])

memory = nex.memory.query(
    user_id='user_xyz',
    context='user_preferences',
    query='email_tone'
)

print(memory['nodes'])

Status: JavaScript/TypeScript library launching with SDK alpha (mid-Jan). Python library coming in Feb.


Authentication

All API requests require an API key in the Authorization header:

Authorization: Bearer nex_sk_abc123...

API Key Types:

  • Secret Key (nex_sk_...): Full access (server-side only, never expose in frontend)
  • Public Key (nex_pk_...): Read-only access (safe for client-side use) [Coming soon]

Rate Limits (Production):

  • Developer Tier: 100 requests/minute
  • Pro Tier: 1,000 requests/minute
  • Enterprise: Custom limits

Security:

  • Always store API keys in environment variables
  • Never commit keys to Git
  • Rotate keys if compromised

API Reference

Memory Graph API

Endpoint: POST /sdk/v1/memory/query
Purpose: Query Nex's Memory Graph for context

Example Request (Curl):

curl -X POST https://nex-ai-os.onrender.com/sdk/v1/memory/query      -H "Authorization: Bearer YOUR_API_KEY"      -H "Content-Type: application/json"      -d '{
       "user_id": "user_xyz",
       "context": "recipient_preferences",
       "query": "investor@vc.fund",
       "limit": 10
     }'

Example Request (JS):

const response = await fetch('https://nex-ai-os.onrender.com/sdk/v1/memory/query', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    user_id: 'user_xyz',
    context: 'recipient_preferences',
    query: 'investor@vc.fund'
  })
});

Boardroom API

Endpoint: POST /sdk/v1/boardroom/mandate
Purpose: Request governance approval for high-stakes action

Example Request (Curl):

curl -X POST https://nex-ai-os.onrender.com/sdk/v1/boardroom/mandate      -H "Authorization: Bearer YOUR_API_KEY"      -H "Content-Type: application/json"      -d '{
       "user_id": "user_xyz",
       "action": {
         "type": "financial_transfer",
         "amount": 5000,
         "reason": "Invoice #1234 payment"
       }
     }'

Polling for Status:

curl -X GET https://nex-ai-os.onrender.com/sdk/v1/boardroom/mandate/mandate_456      -H "Authorization: Bearer YOUR_API_KEY"

PDAR Thinking API

Endpoint: GET /sdk/v1/reasoning/trace
Purpose: Retrieve reasoning trace for transparency

Example Request (Curl):

curl -X GET "https://nex-ai-os.onrender.com/sdk/v1/reasoning/trace?session_id=session_abc123"      -H "Authorization: Bearer YOUR_API_KEY"

HEART API

Endpoint: GET /sdk/v1/heart/state
Purpose: Query Nex's emotional state

Example Request (Curl):

curl -X GET "https://nex-ai-os.onrender.com/sdk/v1/heart/state?user_id=user_xyz"      -H "Authorization: Bearer YOUR_API_KEY"

Webhooks (Real-Time Events)

Purpose: Get notified when events occur (e.g., mandate approved, memory updated)

Setup:

  1. Provide a webhook URL during API key creation
  2. Nex sends POST requests to your endpoint when events occur

Example Event:

POST https://your-app.com/webhooks/nex

{
  "event": "mandate_approved",
  "mandate_id": "mandate_456",
  "timestamp": "2025-01-03T10:30:00Z",
  "data": {
    "user_decision": "approved",
    "action": {
      "type": "financial_transfer",
      "amount": 5000
    }
  }
}

Event Types:

  • mandate_approved - User approved a Boardroom mandate
  • mandate_denied - User denied a Boardroom mandate
  • memory_updated - New nodes added to Memory Graph
  • session_completed - PDAR reasoning trace finalized

Use Cases

Context-Aware Workflows (Email Assistant)

Scenario: Gmail/Outlook plugin adjusting tone based on recipient history

Usage:

// Developer's code
const memory = await nexSDK.memory.query({
  context: "recipient_preferences",
  query: email.from
});

// Use memory to personalize response
const tone = memory.nodes[0]?.data.tone_preference || "neutral";

Governed Automation (Financial Agent)

Scenario: Autonomous invoice payment requiring user approval

Usage:

// Developer's code
const mandate = await nexSDK.boardroom.requestMandate({
  action: {
    type: "financial_transfer",
    amount: 5000,
    reason: "Invoice payment"
  }
});

// Wait for user approval (or listen for webhook)
const decision = await nexSDK.boardroom.waitForApproval(mandate.mandate_id);

if (decision.status === "approved") {
  // Proceed with transaction
}

Transparent AI Apps (Educational Tutor)

Scenario: Showing students how the AI solved a math problem

Usage:

// Developer's code
const trace = await nexSDK.reasoning.getTrace(sessionId);

// Show to user
console.log(`Why I recommended this:
  - What I understood: ${trace.perceive}
  - How I decided: ${trace.decide}
  - What I did: ${trace.act}
  - What I learned: ${trace.reflect}
`);

FAQ

Q: When is this available?
A: Production launched on January 6, 2026. Join waitlist for access.

Q: Is there a free tier?
A: Yes. Developer tier offers 100 requests/minute for free.

Q: What languages are supported?
A: REST API works with any language. Official JavaScript/TypeScript library launching with alpha. Python library coming in Feb 2025.

Q: Can I use this in production?
A: Yes, the SDK is now production-ready as of January 6, 2026.

Q: How do I get API keys?
A: Join the SDK waitlist. Approved users receive keys via email.


Support


Built by Manvendra Modgil (18, solo developer from India)
Version: Production 1.0 | Last Updated: January 6, 2026

Ready to build the future of agentic workflows?

Join the Alpha Waitlist