5-minute guidePublic docs

Get Started with NEES Core Engine

Send your first governed request through NEES Core Engine, inspect the returned trace metadata, and keep your API integration server-side from the start.

A. What You Need

>

A NEES API key

>

Your application backend or local test environment

>

Basic HTTP client support

>

A user/session identifier from your app

env
NEES_API_KEY=your_api_key_here
NEES_BASE_URL=https://api.nees.cloud

B. Send Your First Governed Request

bash
curl -X POST https://api.nees.cloud/chat \
  -H "Authorization: Bearer YOUR_NEES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Explain our product clearly to a new user.",
    "user_id": "demo_user",
    "session_id": "demo_session",
    "mode": "assistant"
  }'

C. JavaScript Example

javascript
import axios from "axios";

const response = await axios.post(
  "https://api.nees.cloud/chat",
  {
    message: "Explain our product clearly to a new user.",
    user_id: "demo_user",
    session_id: "demo_session",
    mode: "assistant",
  },
  {
    headers: {
      Authorization: `Bearer ${process.env.NEES_API_KEY}`,
      "Content-Type": "application/json",
    },
  }
);

console.log(response.data);

D. Python Example

python
import os
import requests

url = "https://api.nees.cloud/chat"

payload = {
    "message": "Explain our product clearly to a new user.",
    "user_id": "demo_user",
    "session_id": "demo_session",
    "mode": "assistant",
}

headers = {
    "Authorization": f"Bearer {os.environ['NEES_API_KEY']}",
    "Content-Type": "application/json",
}

response = requests.post(url, json=payload, headers=headers, timeout=45)
response.raise_for_status()

print(response.json())

E. Understand the Response

json
{
  "reply": "A governed response generated for your user.",
  "trace_id": "trace_abc123",
  "engine_source": "core_engine",
  "governance": {
    "intent": "product_explanation",
    "policy_status": "allowed",
    "memory_scope": "session",
    "identity_status": "stable"
  }
}

reply

The governed text response returned for the current request.

trace_id

A trace identifier you should log for support, debugging, and audits.

engine_source

The engine or runtime source that handled the request.

intent

The interpreted request category used inside governance decisions.

policy_status

Whether the request path was allowed, blocked, or otherwise constrained.

memory_scope

The memory boundary applied to the request, such as session or user scope.

identity_status

Whether identity rules remained stable for the current response.

F. Recommended Integration Pattern

User
v
Your Frontend
v
Your Backend
v
NEES Core Engine
v
AI Provider
v
NEES Governed Response
v
Your Backend
v
Your Frontend

Route requests through your backend so you can keep credentials private, attach your own user/session identifiers, and log trace IDs for support and production review.

Do not expose your NEES API key in frontend code.

G. Basic Modes

ModeUse Case
assistantGeneral AI assistant
companionEmotionally consistent companion
supportCustomer support assistant
tutorEducation / learning assistant
strategicPlanning or decision-support workflow
codingDeveloper tool or AI coding assistant

H. Error Handling

CodeMeaning
401Invalid or missing API key
403Request blocked by policy
429Rate limit reached
500Server/internal error
504Provider timeout

I. Production Checklist

Keep NEES API key server-side only.
Log trace_id for support/debugging.
Define allowed modes for your product.
Decide memory scope rules.
Add safe fallback for blocked or failed responses.
Test common user prompts.
Test adversarial or prompt-injection attempts.
Review response behavior across multiple sessions.

J. Request Beta Access

Email info@nees.cloud with:

Product name
Use case
AI provider currently used
Main behavior problem
Expected request volume
Contact email