Built on Cloudflare Workers

Neural Networks as
Intelligent Decision Points

Replace brittle if/else chains and expensive LLM calls with lightweight neural networks (5K-50K params) that run in milliseconds at the edge.

<5ms
Inference Latency
5K-50K
Parameters
300+
Edge Locations
0
External Dependencies

Why NDS?

Everything you need to build, train, and deploy intelligent decision points.

Pure TypeScript Forward Pass

Dense layers with relu, softmax, sigmoid, and tanh activations. No WASM, no native code, no external ML runtimes.

🎓

In-Browser Training

Train models directly in the browser with TensorFlow.js. Upload CSV data, watch loss curves, and export weights in one click.

🚀

Edge Deployment

Models deploy to Cloudflare Workers with three-tier storage: D1 for metadata, R2 for weights, KV for caching.

🔭

Matryoshka Embeddings

Text inputs converted to embeddings via Workers AI (bge-base-en-v1.5). Truncatable dimensions: 128 to 768.

👁

Visual Editor

React Flow-powered neural network editor. See your architecture as a graph. Add/remove layers visually.

🔒

Multi-Tenant Auth

JWT + API key authentication. PBKDF2 password hashing. Rate limiting. Per-user model isolation.

How It Works

From idea to deployed endpoint in three steps.

1

Design

Pick a template or build a custom architecture in the visual editor. Define labels, layers, and activation functions.

2

Train

Upload training data as CSV or add examples manually. TensorFlow.js trains the model in your browser. No GPU needed.

3

Deploy

One click deploys to the Cloudflare edge. Get a REST endpoint that handles text-to-classification in milliseconds.

Simple REST API

Send text, get classifications. Every model gets its own endpoint. Support for text mode (auto-embed) and pre-computed embedding mode.

POST /v1/switch/:model_id

Returns ranked labels with confidence scores. Use top_k to limit results.

Terminal
# Classify a support ticket
curl -X POST \
  https://nds-api.rckflr.workers.dev/v1/switch/my_router \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer API_KEY" \
  -d '{
    "input": "I need a refund for my order",
    "mode": "text",
    "top_k": 3
  }'

# Response
{
  "model": "my_router",
  "results": [
    { "label": "billing",  "score": 0.87 },
    { "label": "support", "score": 0.09 },
    { "label": "sales",   "score": 0.03 }
  ],
  "latency_ms": 3.2
}

Use Cases

NDS shines where LLMs are overkill and regex isn't enough.

Agent Router

Route user messages to the right AI agent or tool. Replace complex prompt-based routing with a trained classifier that decides in 3ms.

5 labels ~10K params

Binary Validator

Validate inputs before expensive operations. Is this prompt safe? Does this text contain PII? Is this a real support question?

2 labels ~5K params

Tool Reranker

Given a user query, rank which tools are most relevant. Feed the top picks to your agent, skip the rest. Faster than an LLM rerank pass.

8+ labels ~25K params

Architecture

Purpose-built for the Cloudflare edge.

Compute

Cloudflare Workers

TypeScript API handles auth, validation, inference, and model management. Pure JS forward pass, no native deps.

Metadata

D1 (SQLite)

Model metadata, user accounts, API keys, inference logs. SQL migrations for schema evolution.

Storage

R2 (Object Store)

Persistent model weights. JSON serialized. Survives KV eviction. Source of truth for trained parameters.

Cache

KV (Key-Value)

Model cache for fast reads. Embedding cache with TTL. Rate limiting counters. Written last, read first.

AI

Workers AI

bge-base-en-v1.5 for text embeddings. Matryoshka support: truncate 768-dim vectors to 128-512 for your model.

Frontend

Cloudflare Pages

React + Vite + Tailwind. React Flow visual editor. TensorFlow.js for in-browser training. Zero-config deploys.

Start Building Intelligent Switches

Train your first model in under 5 minutes. No credit card required.