Skip to main content

A generic Neuro-Symbolic AI library for probabilistic reasoning and goal alignment.

Project description

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.

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

niusy-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

niusy-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file niusy-0.1.0.tar.gz.

File metadata

  • Download URL: niusy-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for niusy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51ff13ec9b3e86a43d8ee943d2ce2200e7c19daaf5d31eda88e3fc4f40ab9c03
MD5 bd7c1a88ab2f36e4dca692395d8092c1
BLAKE2b-256 74854108936cd0f23cc671102e351118e68296d26e565a236c5b62b3a5be0600

See more details on using hashes here.

File details

Details for the file niusy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: niusy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for niusy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a2c260f37d89999488b76bc369bf90b861bd5facce5d0ac89057802de3c1e33
MD5 16327adbb90cabae4d19e850520140ab
BLAKE2b-256 067826ca602a198e57a224fde1ce8e5676b30ed303c63cb108da7630efdb6a13

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