Skip to main content

A Neuro-San powered Smart Agent Network Framework

Project description

nsflow - A FastAPI based client for NeuroSan

nsflow is a react-based developer-oriented client that enables users to explore, visualize, and interact with smart agent networks. It integrates with NeuroSan for intelligent agent-based interactions.

Project Snapshot


Installation & Running nsflow

nsflow can be installed and run in two different ways:

1️⃣ Run nsflow using pypi package

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

Step 1: Create and source a virtual environment

python -m venv .venv
source .venv/bin/activate

Step 2: Install nsflow from pip

pip install nsflow

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️⃣ 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/leaf-ai/nsflow.git
cd nsflow

Step 2: Install Dependencies

  • Make sure you have python (preferably Python 3.12) installed.
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    pip install -r requirements-dev.txt
    

Step 3: Start the Backend in dev mode & Frontend separately

  • Ensure that you have a few example hocon files in your registries and the same mapped in registries/manifest.

  • [Optional] Ensure that you have the necessary coded tools in the coded_tools dir.

  • From the root start Backend:

    python -m nsflow.run --dev
    
  • Start Frontend:

    • Ensure that you have Node.js (with Yarn) installed.
    • Follow the instructions to setup the frontend here: ./nsflow/frontend/README.md
    • On another terminal window
      cd nsflow/frontend; yarn install
      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
    • You may change the host/port configs using environment variables for fastapi (refer run.py) and using frontend/.env.development for react app

Step 4: To make sure your changes to frontend take effect in the wheel, run the script

  • To build the Frontend
    sh build_scripts/build_frontend.sh
    

Note: The above script's output should show that ./nsflow dir contains a module prebuilt_frontend

  • To build and test the wheel locally
    sh build_scripts/build_wheel.sh
    

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.11.tar.gz (239.5 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.11-py3-none-any.whl (245.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nsflow-0.5.11.tar.gz
  • Upload date:
  • Size: 239.5 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.11.tar.gz
Algorithm Hash digest
SHA256 6ffd319a9896ffb3bb0f7ce6f6a62b33649d5aefd57160e5b47f6dcf212a0c44
MD5 4fd4a8fd0bdeb8aa8adcaced6fcf7f9e
BLAKE2b-256 b794c4ec1e0f0eafcca0271cc6ff96e87c9633710cbac2944789a07578f8cb23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nsflow-0.5.11-py3-none-any.whl
  • Upload date:
  • Size: 245.8 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 a76e37f82e6ee70a5dce2979a7dea7339d20092f9cc0748b4ef25794dfb036ff
MD5 254d8367c5ad10ef3056b309750e96a4
BLAKE2b-256 e22fb93945183078fe8f7942eb2920f968aaf0370d8f2483e5be983ccb593100

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