Skip to main content

NiuSy: A Generic Probabilistic Neuro-Symbolic AI Library

License: Apache 2.0 Python Version Build Status Org: Agicademia

NiuSy (Neuro-v-Symbolic) is a high-performance, Pythonic library for bridging neural perception and symbolic reasoning. It allows developers to build AI agents that combine the robust learning of Deep Learning with the transparency and formal reasoning of Symbolic Logic.


Key Features

  • Probabilistic Logic Engine: Handles uncertainty by assigning confidence scores to facts and rules.
  • Bi-Directional Reasoning: Supports both Forward Chaining (data-driven) and Backward Chaining (goal-driven) for agentic decision making.
  • Explainable AI (XAI): Generates human-readable "Proof Traces" for every decision.
  • Neural Bridge: Interfaces with LLMs to extract symbolic predicates from natural language.
  • Zero-Code Config: Load entire symbolic rule sets from external JSON/YAML configuration files.
  • Domain Modules: Built-in modules for Responsible AI (RAI) audits and AGI Behavior alignment.

Quickstart

1. Installation

git clone https://github.com/Agicademia/NiuSy.git
cd NiuSy
pip install -r requirements.txt

2. A Simple Reasoning Agent

from niusy.agents.agent import ReasoningAgent
from niusy.core.logic import Rule

# Define rules
rules = [
    Rule(premises=['has_fever', 'has_cough'], conclusion_name='is_sick', weight=0.8)
]

# Initialize agent
agent = ReasoningAgent(rules=rules)
agent.process_observation({'has_fever': 0.9, 'has_cough': 1.0})

# Get decision and explanation
result, explanation = agent.act(explain=True)
print(result)

📁 Project Structure

  • niusy/core: Symbolic primitives (Facts, Rules, Constraints).
  • niusy/reasoning: Inference engines (Forward/Backward chaining).
  • niusy/neural: Neural bridges (Concept extractors, LLM wrappers).
  • niusy/audit: Tools for Responsible AI and fairness auditing.
  • niusy/domains: Domain-specific rule modules (AGI, Legal, etc.).

License

NiuSy is licensed under the Apache License 2.0. See the LICENSE file for more details.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Metadata

Release files for niusy 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for niusy 0.1.2
File Size Uploaded
niusy-0.1.2.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for niusy 0.1.2
File Interpreter ABI Platform
niusy-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 28.0 kB

Release files / niusy-0.1.2.tar.gz

Download URL niusy-0.1.2.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0d320b35c3d28d467f52ae3606bd0e7cf0767100a271d10710318bf3360c8fc0
BLAKE2b-256 checksum
How to use checksums
8ff8079fca21864a67b9b7a6799632787c2c1fe1afb6c9d451fd1a47d506a57e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / niusy-0.1.2-py3-none-any.whl

Download URL niusy-0.1.2-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6242e8212d6b2704b839240f83a4406082e26ef322f07e429ad2d9f1687c8dbf
BLAKE2b-256 checksum
How to use checksums
f302bcdf5f62e85e9f1a1ad5adbb03454d91cd22fb13b05e38957434f743fc97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page