SuperAPI AI Directory

neurolink

Edge-first AI platform unifying many providers and models, with multi-agent orchestration, human-in-the-loop workflows, guardrails and context summarization.

Open website

About this tool

Overview

NeuroLink is an open-source project by Juspay (GitHub: https://github.com/juspay/neurolink)的 AI access layer, self-described as "the plumbing layer of the AI nervous system." Its core idea is to treat various model providers (OpenAI, Anthropic, Google, AWS Bedrock, Azure, Mistral, Ollama, and other local runtimes) as "neurons," with NeuroLink acting as the "vascular layer" that streams generated intelligence to the applications that consume it (the "organs"). The project originates from Juspay's production systems and serves internal products such as Tara, Yama, and Clairvoyance.

Three Inference Types

NeuroLink emphasizes that it provides three genuinely distinct inference types, rather than three wrappers around the same capability:

  • generate: Generate text.
  • stream: Stream text generation.
  • decide: Output calibrated boolean, choice, or scoring judgments rather than text. Each provider declares which types it supports via inferenceKinds, rather than inferring it from behavior.

decide is designed to take over the model routing and gating decisions that generate/stream were not originally suited to make. It is driven by a dedicated decision model (TypeSafe Jev, Perplexity-hosted Decisions API, Cloudflare-hosted Clef, or the open-source Laya, XOR), rather than a general-purpose LLM. Taking Jev as an example, a routing decision takes about 400ms and costs about $0.00002, while a full generation call is far more expensive than that. The public APIs are neurolink.decide() and the fail-open neurolink.tryDecide() (which returns null on failure instead of throwing), and the CLI provides the neurolink decide [state] wrapper.

Main Capabilities

  • Unified interface across multiple providers: Switching which "neuron" answers a request requires changing only one parameter. Includes 3 fully local runtimes (Ollama, LM Studio, llama.cpp), and supports per-request credential overrides.
  • Model registry and routing: Built-in 64 models and 132 aliases, with support for metadata, routing, and context window checks; through LiteLLM it can connect to 100+ models, and through OpenRouter it can connect to 300+ models.
  • MCP-native: Covers all 4 transport methods (stdio, HTTP, SSE, WebSocket), and supports remote MCP servers with auth headers, retries, and rate limiting.
  • Voice: TTS, STT, real-time voice.
  • RAG and memory: RAGPipeline, memory read/write (controllable per generate()/stream() call), multi-user memory storage and retrieval, Redis conversation memory (including URL and TLS support), Redis session history export (JSON).
  • File handling: Automatic recognition of CSV and PDF attachments; PDFs support native visual analysis on Vertex, Anthropic, Bedrock, and AI Studio. Images are automatically compressed via the sharp library, reducing upload bandwidth and bypassing provider size limits.
  • Generation-related extensions: Image generation (Gemini, Imagen), video generation (Google Veo 3.1 on Vertex AI, 720p/1080p, landscape and portrait), PPT generation (35 slide types, 5 themes, optional AI-generated images), structured output (Zod schema + output.format: "json").
  • Agents and workflows: Multi-agent orchestration, human-in-the-loop (HITL) approval workflows, content filtering guardrails, TaskManager scheduled and self-running AI tasks (cron-style, with state checkpoints), title generation events (conversation:titleGenerated + NEUROLINK_TITLE_PROMPT custom titles).
  • Production and operations: Redis memory, multi-provider failover, server-side adapters (Hono, Express, Fastify, Koa, with foreground/background modes, route management, OpenAPI generation), external TracerProvider (integrating with existing OpenTelemetry setups), evaluation scoring system (14 scorers, pipelines, CLI, for offline quality evaluation).
  • Deployment forms: Professional CLI and TypeScript SDK; since v9.34.0, a browser-compatible bundle is available (the core API does not depend on Node.js).

Usage

Users can use it via the CLI or the TypeScript SDK. The quick start entry points to the official documentation, Quick Start, npm, and the blog. Switching providers requires only one parameter. For decide: configure the key for the corresponding decision provider; for example, TypeSafe Jev requires TYPESAFE_API_KEY, and it can also be accessed via the Vercel AI Gateway (AI_GATEWAY_API_KEY), with TYPESAFE_TRANSPORT=direct|gateway to force the transport method; per-request credentials are supported. Laya requires LAYA_API_KEY and LAYA_BASE_URL to be set; XOR requires XOR_API_KEY and XOR_BASE_URL to be set; Perplexity requires only PERPLEXITY_API_KEY (or credentials.perplexityDecider); Cloudflare Clef requires CLOUDFLARE_API_KEY and CLOUDFLARE_ACCOUNT_ID. The built-in consumer selects the first configured decision provider in the order TypeSafe, Laya, XOR, Perplexity, Cloudflare Clef.

Scenarios for internal use of decide

The codebase has five decide() calls, each fail-open, and a no-op when no decision provider is configured. Two of them are worth noting: the first call accomplishes three functions in one request (model routing, registry-derived candidate catalog, per-request compactionThreshold) without fan-out; the fifth is wired on demand, and per-query planning in RAGPipeline is not built by the rag: { files } shortcut on generate()/stream(), so you need to build RAGPipeline yourself and pass in the decide function. All decisions go through the same decide()/tryDecide() core, with independent model.decision span telemetry, so even on failure you can distinguish "silent failure" from "never configured."

Cost and limits

Measured with the TypeSafe live API (should not be extrapolated):

  • Latency is basically unrelated to the number of questions (about 393ms for 1 question, about 465ms for 400 questions); concurrent requests queue, so you should batch questions into a single call and never fan out.
  • About $0.042 per million input tokens, output billing is zero, about $0.00002 per decision.
  • Two input limits: state + the longest single question is about 33,000 tokens; state + all questions is about 64,000 tokens.
  • Accuracy is a tradeoff: about 68% on TypeSafe's own 711-case benchmark, versus about 73% for frontier models (figures published by TypeSafe). Suitable for gated, reversible decisions (routing, dropping, budgeting), not for final answers that users will see.

Perplexity Decisions API (measured in October 2026):

  • Up to 128 questions and 8 images per request; the server reads no more than 262,144 input tokens, and exceeding this explicitly returns 400 rather than silently truncating.
  • Latency grows faster than linearly with input: about 3.9s for 65,000 tokens, about 10s for 146,000, and about 22.9s for 251,000. Images count as about 1 input token per 32×32 block, plus a fixed request overhead of about 95~103 tokens.
  • The test account is limited to 10 requests/second, and 429 includes Retry-After, which NeuroLink will honor.
  • NeuroLink's own state window is 100,000 estimated tokens, which is a local limit rather than a server-side limit. The price is $0.04 per million input tokens (including image tokens, output free, figures published by Perplexity).

Notes

The above is compiled from the project README and official documentation links; no inferences are made about features, prices, or effects that are not provided. The documentation, Quick Start, npm, blog, and various guides (HITL, Guardrails, CSV/PDF, LiteLLM/SageMaker, Server Adapters, etc.) can all be found in the project repository.