SDK docs

Neurix Labs SDK

A practical guide for generating intelligent 3D NPCs with personality, memory, dialogue, behaviors, and game-ready assets.

Overview

Build intelligent NPCs with Neurix

Neurix is an AI platform for creating game-ready 3D NPCs from simple prompts. The SDK gives your game or tooling pipeline a typed way to generate characters, shape personality, attach memory, create dialogue, mutate runtime behavior, and export assets for modern engines.

The client is intentionally transport-light. It wraps the Neurix HTTP API and stays flexible enough for Unity, Unreal, Godot, Babylon.js, React Three Fiber, custom engines, and backend orchestration.

Start

Installation

Install the SDK in any Node.js 18+ or fetch-compatible TypeScript environment.

npm install @neurix-labs/sdk

Auth

Configuration

Neurix uses bearer API keys. You can configure the SDK with environment variables or pass options directly to the client. Constructor options take precedence, which is useful for multi-project dashboards and internal tools.

  • NEURIX_API_KEY authenticates requests.
  • NEURIX_PROJECT_ID scopes generated NPCs to a project.
  • NEURIX_GAME_ID links characters to a game or world.
  • NEURIX_ENVIRONMENT separates development, staging, and production.
import { NeurixClient } from "@neurix-labs/sdk";

const neurix = new NeurixClient({
  apiKey: process.env.NEURIX_API_KEY,
  projectId: "project_123",
  gameId: "game_abc",
  environment: "development"
});

Generation

Prompt to NPC

Use generation when you want Neurix to create a complete NPC profile from a compact creative brief. The response can include identity, personality traits, dialogue style, memory defaults, behavioral tendencies, and asset references.

const npc = await neurix.npc.generate({
  prompt: "A witty cyberpunk mechanic who remembers every player favor",
  world: "Neon open-world RPG",
  artStyle: "stylized 3D",
  output: ["profile", "dialogue", "behavior", "asset"]
});

Character depth

Personality and memory

Personality defines how an NPC reacts. Memory defines what the NPC can carry forward. Together, they let characters respond with continuity instead of acting like disposable dialogue boxes.

Use scoped memories for player-specific facts, world memories for shared lore, and session memories for short-lived gameplay context.

  • Personality controls tone, goals, fears, values, and conversational habits.
  • Memory can be persistent, scoped, temporary, or world-level.
  • Runtime mutation lets events change an NPC after generation.

Conversation

Dialogue runtime

Dialogue APIs support direct lines, branching trees, and streaming responses. Use them for quests, ambient NPC chatter, player relationship systems, and live in-game conversations.

const reply = await neurix.dialogue.create({
  npcId: npc.id,
  playerId: "player_42",
  message: "Do you still have that engine part?",
  includeMemory: true
});

Export

Game-ready assets

Neurix can prepare character assets for runtime use or handoff into a content pipeline. Use exports for previews, 3D models, textures, rig metadata, voice attachments, and engine adapters.

  • Export metadata for Unity, Unreal, Godot, and web engines.
  • Attach voice profiles and animation hints to generated NPCs.
  • Track long-running exports through async jobs.

Runtime

Engine integration

The SDK does not force a specific engine loop. Keep Neurix on your server, editor tooling, or runtime service, then pass compact NPC state into your engine adapter.

// Example adapter shape
const runtimeNpc = {
  id: npc.id,
  displayName: npc.profile.name,
  behavior: npc.behavior,
  memoryScope: "player",
  assetUrl: npc.assets.modelUrl
};

Automation

Jobs and webhooks

Generation, asset export, and large population creation can run as async jobs. Use polling during local development and webhooks for production pipelines.

  • Use jobs for long-running generation and exports.
  • Use webhooks to update internal tools when assets are ready.
  • Store returned IDs so your game can safely resume workflows.

Production

Security guidance

Keep API keys server-side. For games, issue short-lived session tokens from your backend rather than embedding privileged keys in clients.

  • Never ship your Neurix API key inside a public game client.
  • Proxy sensitive generation or mutation calls through your backend.
  • Validate player input before attaching it to persistent memory.