Skip to main content

Axiomatization of graphs for RDFLib

Project description

rdflib-reasoning

License: MIT Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

PyPI Version PyPI - Python Version

Coverage

rdflib-reasoning is a monorepo for Python packages and notebooks used to study how tool-grounded Research Agents interact with RDF graphs and formal reasoning systems.

The repository is organized around one practical research question:

When do tool-grounded Research Agent harnesses outperform direct prompting on multi-step formal reasoning tasks that require external knowledge retrieval, knowledge-base updates, and verifiable inference?

Reviewer Guide

If you are reviewing this repository quickly, start here:

  1. Read this file for the repository layout and install paths.
  2. Read docs/dev/architecture.md for the current technical direction.
  3. Inspect rdflib-reasoning-engine for the reasoning core.
  4. Inspect rdflib-reasoning-middleware for Research Agent integration.
  5. Inspect notebooks for the research surface and experiments.

Repository Roles

This repository distinguishes between two agent types. Canonical definitions are in AGENTS.md.

  • Research Agent: The deployed or runtime agent that is the subject of research. It sees middleware, tools, system prompts, and generated schema; it does not see the repository or design documentation.
  • Development Agent: The code agent that reads repository documentation, modifies code and docs, and develops code for the Research Agent.

Repository Layout

Path Purpose
notebooks Analysis notebooks and research experiments
rdflib-reasoning-axioms Graph axiomatization primitives
rdflib-reasoning-engine RETE-based RDFS and OWL 2 RL entailment
rdflib-reasoning-middleware Middleware and Research Agent-facing data interchange
docs/dev Architecture notes, decision records, and development guidance
docs/specs Cached specifications optimized for development work

API and developer documentation can be generated locally with make docs and served from the generated HTML output with make docs-serve.

Component Overview

Research on agents takes place in Analysis Notebooks, uses the LangChain ecosystem, and depends on packages defined in this repository. Those packages build on RDFLib for semantic-web support and on Pydantic for Research Agent-friendly schemas.

---
config:
  theme: 'base'
---
block-beta
columns 3
  Notebooks("Analysis Notebooks"):3
  Deepagents:1 ReasoningMiddleware["rdflib-reasoning-middleware"]:2
  LangGraph:2
  block:RdflibAbstraction:1
    columns 1
    Reasoning["rdflib-reasoning-engine"]:1
    Axioms["rdflib-reasoning-axioms"]:1
  end
  LangChain:2 RDFLib:1

  %% Agent Note: The remainder of this block is styling for humans and can be ignored

  classDef Research fill:#fdb462,stroke:black
  class Notebooks Research

  classDef LangChainEcosystem fill:#80b1d3,stroke:blue
  class Deepagents,LangGraph,LangChain LangChainEcosystem

  classDef SupportingPackage fill:#b3de69,stroke:black
  class ReasoningMiddleware,Reasoning,Axioms SupportingPackage

  classDef SemanticWeb fill:#ccebc5,stroke:darkgreen
  class RDFLib SemanticWeb

Installation

Development in this repository is expected to use the rdflib-reasoning conda environment.

Base install:

pip install -e .

Developer tooling:

pip install -e .[dev]

Notebook and research tooling:

pip install -e .[research]

Full local workspace:

pip install -e .[dev,research]

If you use uv, the equivalent commands are:

uv sync
uv sync --extra dev
uv sync --extra research
uv sync --extra dev --extra research

The root Makefile wraps those commands with install, install-dev, install-research, install-all, and notebook.

Why This Repository Exists

RDFLib does not by itself provide a clean path for graph axiomatization, Research Agent-oriented schema exposure, and inspectable reasoning workflows. This repository packages those concerns into reusable libraries and research notebooks so that formal-logic experiments with agents are easier to build, evaluate, and explain.

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

rdflib_reasoning-0.1.0.post1.dev83.tar.gz (328.0 kB view details)

Uploaded Source

Built Distribution

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

rdflib_reasoning-0.1.0.post1.dev83-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file rdflib_reasoning-0.1.0.post1.dev83.tar.gz.

File metadata

File hashes

Hashes for rdflib_reasoning-0.1.0.post1.dev83.tar.gz
Algorithm Hash digest
SHA256 a1bb99bd9b14cf858f5d26bc47592974c0ac38b310d03c8639d5e9241fff4fb7
MD5 d4a393dfa3487990f4b73bf7eda58204
BLAKE2b-256 7e3ac423df7108eb8d7f79005106bf06d831c306e95ed91f964de08d3115699e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdflib_reasoning-0.1.0.post1.dev83.tar.gz:

Publisher: release.yml on kvjrhall/rdflib-reasoning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rdflib_reasoning-0.1.0.post1.dev83-py3-none-any.whl.

File metadata

File hashes

Hashes for rdflib_reasoning-0.1.0.post1.dev83-py3-none-any.whl
Algorithm Hash digest
SHA256 d84d933a464ca107c519ec37d4e2f4d2782dbc9e4c0077150c2f2667c701cd68
MD5 ab5b14d0bb26578625d0234beea368bc
BLAKE2b-256 66689135de0b0d343e06f00c85345db73ff0b0f3715e56e98569af3d013e235e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rdflib_reasoning-0.1.0.post1.dev83-py3-none-any.whl:

Publisher: release.yml on kvjrhall/rdflib-reasoning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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