Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/arg-tech/xaif/llms.txt

Use this file to discover all available pages before exploring further.

The xAIF Python library provides a programmatic interface for creating and manipulating argument structures in the Extended Argument Interchange Format (xAIF). Whether you are building argument mining pipelines, processing debate transcripts, or constructing argumentation graphs from scratch, xAIF gives you the tools to work with IAT-compliant JSON structures.

Introduction

Learn what xAIF is, how it relates to AIF, and when to use this library

Quickstart

Install the package and build your first argument graph in minutes

xAIF Format

Understand the JSON structure: nodes, edges, locutions, and participants

API Reference

Complete reference for the AIF class and all its methods

What is xAIF?

xAIF (Extended Argument Interchange Format) is a JSON-based standard for representing argumentation structures. It extends the original AIF specification to support both underspecified and overspecified argument graphs — making it suitable for incremental argument mining pipelines, dialogue processing, and annotation workflows. The xAIF library gives you a Python class (AIF) that wraps an xAIF JSON document and exposes methods to:
  • Add locutions (speaker turns), propositions (I-nodes), and argument relations (inference, conflict, rephrase)
  • Validate and inspect the graph structure
  • Export proposition pairs and their relations as pandas DataFrames
1

Install xAIF

pip install xaif
2

Import and initialise

from xaif import AIF

aif = AIF("Climate change is real. Evidence supports this.")
3

Add components

aif.add_component(component_type="proposition", Lnode_ID=0, proposition="Climate change is real.")
aif.add_component(component_type="argument_relation", relation_type="RA", iNode_ID1=2, iNode_ID2=0)
4

Export and inspect

import json
print(json.dumps(aif.xaif, indent=2))
print(aif.get_csv("argument-relation"))

Key Features

Node Types

L, I, RA, CA, MA, YA, and TA nodes — all the building blocks of AIF argument graphs

Build Argument Graphs

Step-by-step guide to constructing argument structures programmatically

Dialogue Processing

Work with multi-speaker dialogues: locutions, participants, and turn entries

Export to CSV

Export argument relations and locutions as pandas DataFrames for ML pipelines

Build docs developers (and LLMs) love