Skip to main content

A Neuro-San powered Smart Agent Network Framework

Project description

NSFlow - A FastAPI based client for NeuroSan

NSFlow is a framework that enables users to explore, visualize, and interact with smart agent networks. It integrates NeuroSan for intelligent agent-based interactions.

Project Logo


Installation & Running NSFlow

NSFlow can be installed and run in three different ways:

1️⃣ Run NSFlow using git repo

To simplify execution, NSFlow provides a CLI command to start both the backend and frontend simultaneously.

Step 1: Clone the repository

git clone https://github.com/leaf-ai/nsflow.git

Step 2: Install NSFlow dependencies

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-private.txt

Step 3: Run Everything with a Single Command

python -m nsflow.run

By default, this will start:

  • backend (FastAPI + NeuroSan) here: http://127.0.0.1:4173/docs or http://127.0.0.1:4173/redoc
  • frontend (React) here: http://127.0.0.1:4173

2️⃣ Run NSFlow with a Wheel

You can run NSFlow inside a Docker container, which includes both the backend and frontend.

Step 1: Build the Frontend

sh build_scripts/build_frontend.sh

Step 2: Build the Wheel

sh build_scripts/build_wheel.sh

Note: The above script output should show that the wheel contains a module prebuilt_frontend


3️⃣ Development & Contribution (Manually Start Frontend & Backend)

If you want to contribute, ensure you have the necessary dependencies installed: To start the frontend and backend separately, follow these steps:

Step 1: Clone the Repository

git clone https://github.com/your-org/nsflow.git
cd nsflow

Step 2: Install Dependencies

Make sure you have Python 3.12 and Node.js (with Yarn) installed.

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-private.txt
cd frontend; yarn install

Step 3: Start the Backend & Frontend on separately

Backend:

cd .. # Back to project root
python -m nsflow.run --dev

Frontend: On another terminal window

cd frontend
yarn dev

By default:

  • backend will be available at: http://127.0.0.1:8005
  • frontend will be available at: http://127.0.0.1:5173

OR

Step 3: Start the prebuilt Frontend served with Backend

Note:

  • Ensure that ./nsflow/prebuilt_frontend/dist dir exists in your project
  • run sh build_scripts/build_frontend.sh to create the above dist if it is not present
cd .. # Back to project root
python -m nsflow.run
  • frontend will be available at: http://127.0.0.1:4173
  • backend will be available at: http://127.0.0.1:4173/docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nsflow-0.5.8.tar.gz (208.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nsflow-0.5.8-py3-none-any.whl (213.6 kB view details)

Uploaded Python 3

File details

Details for the file nsflow-0.5.8.tar.gz.

File metadata

  • Download URL: nsflow-0.5.8.tar.gz
  • Upload date:
  • Size: 208.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nsflow-0.5.8.tar.gz
Algorithm Hash digest
SHA256 a5f86f6967814ac39c0d5374dcb31c6695ac6290791a6bad192e5bb9cf690003
MD5 93371c49fe8e07d36229a78e718a93df
BLAKE2b-256 717076035a4309e9db2860560958e62140a9f72123cc02b5674a3b73692355ee

See more details on using hashes here.

File details

Details for the file nsflow-0.5.8-py3-none-any.whl.

File metadata

  • Download URL: nsflow-0.5.8-py3-none-any.whl
  • Upload date:
  • Size: 213.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nsflow-0.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab396012cc1c4cdb1b51afbd17353845281150220a8c33f002f35aa238929ab
MD5 74b4d81ee9922ffdcae4c5a188d890f5
BLAKE2b-256 17ffa32bac34a8641c317876bd7a7d21e6b364d0c79efb4ed390214bd7bfc808

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page