Skip to main content

Build a general-purpose, batteries-included Python library for creating, importing, analyzing, and reasoning over argument graphs derived from text and multimodal evidence.

Project description

ArgLib

PyPI Python CI Docs License

ArgLib is a batteries-included Python library for creating, importing, analyzing, and reasoning over argument graphs derived from text and multimodal evidence.

Highlights

  • Canonical ArgumentGraph model with provenance-aware nodes and relations.
  • Dung semantics (grounded/preferred/stable/complete) and basic ABA tooling.
  • Diagnostics for cycles, components, reachability, and degree stats.
  • JSON IO with schema validation and Graphviz DOT export.
  • CLI tools for DOT, diagnostics, validation, and ABA.
  • Argument bundles for higher-level reasoning and credibility propagation scoring.
  • Evidence cards and supporting documents for evidence pipelines.
  • Deterministic evidence scoring and edge validation helpers (LLM adapters planned).

Install

python -m pip install arglib

Quickstart

from arglib.core import ArgumentGraph
from arglib.reasoning import Reasoner

graph = ArgumentGraph.new(title="Parks")
c1 = graph.add_claim("Green spaces reduce urban heat.", type="fact")
c2 = graph.add_claim("Cities should fund parks.", type="policy")
graph.add_support(c1, c2, rationale="Cooling improves health")

reasoner = Reasoner(graph)
results = reasoner.run(["grounded_extension", "grounded_labeling"])

Evidence and scoring

from arglib.ai import score_evidence, validate_edges

scores = score_evidence(graph)
edge_report = validate_edges(graph)

Bundles and credibility propagation

from arglib.reasoning import compute_credibility

bundle = graph.define_argument([c1, c2], bundle_id="arg-1")
cred = compute_credibility(graph)

CLI examples

arglib dot path/to/graph.json
arglib diagnostics path/to/graph.json --validate
arglib validate path/to/graph.json
arglib aba path/to/aba.json --semantics preferred

Development

This repo uses uv for dependency management.

uv sync
scripts/check.sh

Documentation

Full docs and guides are available at https://vasanthsarathy.github.io/arglib/.

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

arglib-0.1.3.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

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

arglib-0.1.3-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

Details for the file arglib-0.1.3.tar.gz.

File metadata

  • Download URL: arglib-0.1.3.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arglib-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f6a38e44d75ccf85c1b139503843319e228268d70524b3c5e10e0aa85316af03
MD5 a96ca0434ee01d5b3988a2d9812c1cd5
BLAKE2b-256 542a5f76c5d249ea4cff268e539dc77233451bd0e958a00c0ab542b00f12ff65

See more details on using hashes here.

Provenance

The following attestation bundles were made for arglib-0.1.3.tar.gz:

Publisher: release.yml on vasanthsarathy/arglib

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

File details

Details for the file arglib-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: arglib-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for arglib-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ac5f73aac8be24c13d4582bff871a680150c7e6de9f032cf1c383ab640c8d010
MD5 a9bb2ef9662e10e1cc0571a8bf2177be
BLAKE2b-256 ad32c7838c43637aab004fd3285ddcefc8a489fef0667b9c6adbbf9bf24331dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for arglib-0.1.3-py3-none-any.whl:

Publisher: release.yml on vasanthsarathy/arglib

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