Neurosurfer: production-ready AI agent framework with multi-LLM, RAG, tools, and FastAPI server
Project description
Neurosurfer helps you build intelligent apps that blend LLM reasoning, tools, and retrieval with a ready-to-run FastAPI backend and a React dev UI. Start lean, add power as you go — CPU-only or GPU-accelerated.
- 🧩 OpenAI-style API with streaming & tool-calling
- 📚 RAG-ready: ingest → chunk → retrieve → augment
- 🤖 Agents (ReAct, SQL, RAG) + 🔧 Tools (calc, web, custom)
- 🧠 Multi-LLM: OpenAI, Transformers/Unsloth, vLLM, Llama.cpp, more
- 🖥️ NeurowebUI (React) for chat UX, threads, uploads
🗞️ News
- CLI
serveimprovements — run backend-only or UI-only, injectVITE_BACKEND_URLautomatically. See CLI guide. - Model registry & RAG hooks — easier wiring for multi-model setups. See Example App.
- Optional LLM stack — install heavy deps only when you need them:
pip install "neurosurfer[torch]"
Looking for older updates? Check the repo Releases and Changelog.
⚡ Quick Start
A 60-second path from install → dev server → your first inference.
Install (minimal core):
pip install -U neurosurfer
Or full LLM stack (torch, transformers, bnb, unsloth):
pip install -U "neurosurfer[torch]"
Run the dev server (backend + UI):
neurosurfer serve
- Auto-detects UI; pass
--ui-rootif needed. First run maynpm install. - Backend binds to config defaults; override with flags or envs.
Hello LLM Example:
from neurosurfer.models.chat_models.transformers import TransformersModel
llm = TransformersModel(
model_name="unsloth/Llama-3.2-1B-Instruct-bnb-4bit",
load_in_4bit=True
)
res = llm.ask(user_prompt="Say hi!", system_prompt="Be concise.", stream=False)
print(res.choices[0].message.content)
🏗️ High-Level Architecture
Neurosurfer Architecture
✨ Key Features
-
Production API — FastAPI backend with auth, chat APIs, and OpenAI-compatible endpoints → Server setup
-
Intelligent Agents — Build ReAct, SQL, and RAG agents with minimal code, optimized for specific tasks → Learn about agents
-
Rich Tool Ecosystem — Built-in tools (calculator, web calls, files) plus easy custom tools → Explore tools
-
RAG System — Ingest, chunk, and retrieve relevant context for your LLMs → RAG System
-
Vector Databases — Built-in ChromaDB with an extensible interface for other stores → Vector stores
-
Multi-LLM Support — OpenAI, Transformers/Unsloth, vLLM, Llama.cpp, and OpenAI-compatible APIs → Model docs
📦 Install Options
pip (recommended)
pip install -U neurosurfer
pip + full LLM stack
pip install -U "neurosurfer[torch]"
From source
git clone https://github.com/NaumanHSA/neurosurfer.git
cd neurosurfer && pip install -e ".[torch]"
CUDA notes (Linux x86_64):
# Wheels bundle CUDA; you just need a compatible NVIDIA driver.
pip install -U torch --index-url https://download.pytorch.org/whl/cu124
# or CPU-only:
pip install -U torch --index-url https://download.pytorch.org/whl/cpu
📝 License
Licensed under Apache-2.0. See LICENSE.
🌟 Support
- ⭐ Star the project on GitHub.
- 💬 Ask & share in Discussions: Discussions.
- 🧠 Read the Docs.
- 🐛 File Issues.
- 🔒 Security: report privately to naumanhsa965@gmail.com.
📚 Citation
If you use Neurosurfer in your work, please cite:
@software{neurosurfer,
author = {Nouman Ahsan and Neurosurfer contributors},
title = {Neurosurfer: A Production-Ready AI Agent Framework},
year = {2025},
url = {https://github.com/NaumanHSA/neurosurfer},
version = {0.1.0},
license = {Apache-2.0}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neurosurfer-0.1.0.tar.gz.
File metadata
- Download URL: neurosurfer-0.1.0.tar.gz
- Upload date:
- Size: 557.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1626fb2e0a3268329cb78e6503e37b73d9e5b8807336332929f7d43e37ce0516
|
|
| MD5 |
c91728863ac60edf51a63b53c4e7cea5
|
|
| BLAKE2b-256 |
b11aa1e2a60136818d617bf2e61f6a9d9e5557c9200304d507de9bf4ac4790b2
|
File details
Details for the file neurosurfer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: neurosurfer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 593.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c89e9005766e78c062a5baea66dcc3d3dc3e63f5eabf717c30593855680bc22c
|
|
| MD5 |
7755e83b39af55a59d9cafc2392670ac
|
|
| BLAKE2b-256 |
af8704402e114de2f6ba27e31f10f6dc1b34b850907031cde37f6cd289d0d806
|