NeuronX SDK

Build AI applications with 24 free LLMs + Brain 72B, 256K+ code patterns, autonomous agents, and a self-improving Knowledge Graph.

MIT License Python 3.8+ Node 18+ PyPI npm
Python pip install nx-ai
JavaScript npm install nx-ai  # coming soon
24
Free LLM Providers
256K+
Code Patterns
210K
FAISS Vectors
7.5K+
KG Nodes
7
Autonomous Agents
700+
API Endpoints

Get started in 3 lines

Every feature is one method call away.

Python
JavaScript
from neuronx import NeuronX

nx = NeuronX(api_key="nx-YOUR_KEY")

# Chat — 24 free LLM providers
response = nx.chat("explain quicksort in Python")
print(response.text)

# Generate code — 256K+ patterns + LLM
code = nx.codegen("REST API with JWT auth", language="python")
print(code.code)

# AI search — 3 engines + AI summary
results = nx.search("transformer attention")
print(results.summary)

# Code review — 19 security patterns
review = nx.review("eval(user_input)")
for issue in review.issues:
    print(f"[{issue.severity}] {issue.message}")

# Autonomous agents — 7 roles, 13 tools
task = nx.agents.run("find security vulnerabilities")
result = nx.agents.wait(task.task_id)
print(result.result)

Everything you need

One SDK, 11 AI capabilities.

Chat

Talk to 24 LLM providers (Brain 72B, Groq, Gemini, Mistral, OpenRouter) with smart routing. Zero API costs.

nx.chat("...")

Code Generation

Generate code using 256K+ real-world patterns + LLM. Supports Python, JS, Go, Rust, and more.

nx.codegen("...", language="python")

AI Search

3-engine search (FAISS vectors, keyword, web) with AI-generated summaries.

nx.search("...")

Problem Solving

Multi-step reasoning for complex problems. Get structured solutions with confidence scores.

nx.solve("...")

Code Review (Guard)

19 security patterns, 62 language rules. Catches SQL injection, XSS, eval, hardcoded secrets.

nx.review("eval(input)")

Pattern Search

Search 28K+ code patterns: singleton, factory, observer, decorator, middleware, and more.

nx.patterns.search("singleton")

Knowledge Graph

7.5K+ concept nodes, 48K+ edges. Explore relationships between programming concepts.

nx.kg.query("fastapi")

Autonomous Agents

7 specialized roles, 13 tools, ReAct loop. Deploy agents that think, act, and deliver results.

nx.agents.run("find bugs")

Marketplace

5 pre-built agents: code-reviewer, bug-hunter, system-monitor, data-collector, research-assistant.

nx.marketplace.run("bug-hunter")

Streaming

Real-time SSE streaming for chat responses. Build responsive UIs with incremental output.

nx.chat_stream("...")

Async Support

Full async/await support in both Python (httpx) and JavaScript (native fetch).

await nx.chat("...")

Self-Improving

Every SDK call feeds NeuronX's learning loop. The platform gets smarter with every interaction.

pip install nx-ai

Start building in 60 seconds

Free forever. No API costs. 24 LLM providers included + Brain 72B.

Install Python SDK Try Playground View on GitHub