Arg2P

io.github.tuPrologPublished by GitHub account tuPrologv0.25.1Updated Nov 6, 2026

Structured argumentation: solve ASPIC+, ABA and abstract theories, explore their results

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Solves structured argumentation theories (ASPIC+, ABA, abstract frameworks) in Prolog, returning solutions, labellings and argument graphs.

What you can do
  • Check whether a theory, its flags or a query parses, with line, column and token of any error
  • Solve a Prolog query on a theory, returning its first solutions with bindings and the argument graph of the last yes
  • Answer which statements a query labels in, out or und, credulously or skeptically
  • Read the profile and flag values in effect for a theory
  • Open an interactive solver view of a theory so the user can browse results themselves
When to use it
Useful when an assistant has to reason over formal argumentation or defeasible logic theories, explain why a claim is justified or rejected, or inspect argument graphs and attack relations rather than guess an answer.
Requirements
Runs as a local stdio process, launched with uvx from the arg2p PyPI package, whose wheel bundles a Java runtime. No authentication, environment variables or headers are declared. Desktop only.
Before you install
The server evaluates Prolog queries on the supplied theory, so treat theory text as executable input. When a theory is refused by its profile or does not parse, the server returns an error; the answer should not be guessed instead.

Installation

In SourceWeft

  1. Open Arg2P in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[Arg2P logo]

Arg2P

[CI/CD] [Maven Central] [npm] [PyPI] [Kotlin coverage] [Prolog coverage] [Documentation] [License]

Arg2P is an implementation of the ASPIC+ framework for structured argumentation, which reads assumption-based and abstract frameworks as well. Built on top of the tuProlog engine, it runs on the JVM, in JavaScript (Node.js and browsers) and in Python, with the same API; its solver runs in the browser, in VS Code, and for AI assistants.

The documentation starts from Getting Started.

[The playground]


Installing

JVM (Gradle, Maven Central)implementation("it.unibo.tuprolog.argumentation:arg2p-jvm:<VERSION>")
JavaScript (npm)npm install @tuprolog/arg2p
Python (PyPI)pip install arg2p (the wheel bundles a Java runtime)
Browserthe Web Playground: nothing to install
VS Codethe extension
Claude Code/plugin install arg2p --marketplace tuProlog/arg2p-kt
Codexcodex plugin marketplace add tuProlog/arg2p-kt, then install arg2p from /plugins

<VERSION> is the latest release, shown by the Maven Central badge above. See Execution for a first program on each platform, the playground, the extension of VS Code, and the plugin and MCP server of Arg2P for AI assistants (the other clients, and the server alone).

[Arg2P in VS Code]


Issue tracking

If you encounter any issues, please report them on the GitHub Issues page.
Your feedback helps improve the project!


References

Arg2P is described in:

  • Roberta Calegari, Andrea Omicini, Giuseppe Pisano, Giovanni Sartor. Arg2P: an argumentation framework for explainable intelligent systems. Journal of Logic and Computation, 32(2):369–401, 2022. doi:10.1093/logcom/exab089
  • Giuseppe Pisano. Argumentation for legal reasoning: meta-models, technology and beyond. PhD thesis, Alma Mater Studiorum — Università di Bologna, 2024. doi:10.48676/unibo/amsdottorato/11671

Individual features — burden of persuasion, defeasible preferences, modularity, causality, distributed reasoning — have their own papers, listed on the References page of the wiki.

Cite me

If you use Arg2P in academic work, please cite:

bibtex
@article{arg2p,  author  = {Calegari, Roberta and Omicini, Andrea and Pisano, Giuseppe and Sartor, Giovanni},  title   = {{Arg2P}: an argumentation framework for explainable intelligent systems},  journal = {Journal of Logic and Computation},  volume  = {32},  number  = {2},  pages   = {369--401},  year    = {2022},  doi     = {10.1093/logcom/exab089}}
bibtex
@phdthesis{pisano2024argumentation,  author  = {Pisano, Giuseppe},  title   = {Argumentation for legal reasoning: meta-models, technology and beyond},  school  = {Alma Mater Studiorum --- Universit\`a di Bologna},  year    = {2024},  doi     = {10.48676/unibo/amsdottorato/11671}}

Source: README.md at commit b968602

Tools

5

solve

Solve a query

Solves a query on a theory of arg2p: its first solutions (yes, no, or halt with an error), with their bindings, and the argument graph of the last yes (every argument with its conclusion, top rule, sub-arguments and label in, out or und; every attack with its type); more tells whether the search has alternatives left (they may give other solutions, or no), and output is what the theory printed. The default query, arg2p::solve(In, Out, Und), gives the statements labelled in, out and und. Out of time, it gives the solutions found until then (timedOut).

ParametersflagsquerytheoryrequiredmaxSolutionstimeoutSeconds

answer

Label the statements of a query

The statements matching a query (a literal, as flies(X) or -flies(tweety)) labelled in (justified), out (rejected) and und (undecided) by the theory, under its semantics: answers, one for each labelling, or one across them all with the flag answerMode(credulous) or answerMode(skeptical).

ParametersflagsqueryrequiredtheoryrequiredtimeoutSeconds

check

Check a theory or a query

Whether a theory (or flags) or a query parses, and where it does not (line, column, token).

Parameterskindtextrequired

settings

The settings in effect

The value in effect of every flag for a theory: its profile (graphBuildMode), the semantics, the graph extensions, ... as the theory, the flags and the profile set them. A theory that does not parse is refused.

ParametersflagstheoryrequiredtimeoutSeconds

explore

Show the solver of a theory

Shows the user the solver of a theory, to explore its results themselves: the query run, its solutions, the argument graph of each and the stages of its computation, the drawing of an abstract framework, the flags. Hosts of MCP Apps show it in the conversation; the result links the same theory in the web playground, for every host. Use it when the user wants to see or explore the results.

ParametersflagsquerytheoryrequiredtimeoutSeconds

Version history

3
  1. v0.25.1LatestNov 6, 2026
  2. v0.25.0Nov 5, 2026
  3. v0.23.0Oct 29, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts