Skip to main content

ADI — Agent Decision Intelligence

Rank options, quantify confidence, and explain the decision.

CI Release License Python

ADI is a Python library for structured multi-criteria decisions. Give it options, weighted criteria, constraints, and evidence confidence; it returns a ranked result with explainability, sensitivity analysis, and feedback-driven learning.

It is designed for two use cases:

  • application code that needs auditable decision logic
  • LLM agents that should call a deterministic ranking tool instead of improvising tradeoffs

Status: alpha. The core API is usable today, but expect refinement as real-world usage expands.

Why ADI

  • Deterministic ranking: scores and ranks options from explicit structured inputs.
  • Confidence-aware output: low-confidence evidence can reduce score impact or lower final confidence.
  • Explainable decisions: returns criterion contributions, constraint reports, and counterfactual guidance.
  • Scenario analysis: supports what-if runs and cross-scenario comparison.
  • Learning loop: feedback can update saved preference profiles for future runs.
  • Agent-ready: ships OpenAI and Anthropic tool schemas out of the box.

Install

From source:

git clone https://github.com/dimgouso/adi-Agent-Decision-Intelligence.git
cd adi-decision
pip install -e .

With development tooling:

pip install -e ".[dev]"

After PyPI publishing is enabled:

pip install adi-decision

Quick Start

from adi import DecisionRequest, decide
from adi.schemas.decision_request import Criterion, Option, OptionValue

request = DecisionRequest(
    options=[
        Option(
            name="Supplier A",
            values=[
                OptionValue(criterion_name="cost", value=100),
                OptionValue(criterion_name="quality", value=0.80, confidence=0.95),
            ],
        ),
        Option(
            name="Supplier B",
            values=[
                OptionValue(criterion_name="cost", value=85),
                OptionValue(criterion_name="quality", value=0.68, confidence=0.70),
            ],
        ),
    ],
    criteria=[
        Criterion(name="cost", weight=0.45, direction="cost"),
        Criterion(name="quality", weight=0.55, direction="benefit"),
    ],
    policy_name="balanced",
)

output = decide(request)

print(output.best_option)
for item in output.ranking:
    print(item.option_name, item.score, item.confidence)

LLM Agent Integration

from adi import call_adi_tool, get_openai_tools

tools = get_openai_tools()

# Pass `tools` to your OpenAI client.
# When the model calls `adi_decide`, route the arguments here:
result = call_adi_tool(tool_arguments)

CLI And API

CLI:

adi validate request.json
adi decide --input request.json
adi decide --input request.json --policy risk_averse

API:

uvicorn adi.interfaces.api:app --reload

Key endpoints:

  • GET /health
  • POST /decide
  • GET /policies
  • GET /policies/{policy_name}

Core Features

  • Policies: balanced, risk_averse, and exploratory
  • Constraints: hard elimination or soft penalties
  • Sensitivity: robustness checks under weight perturbation
  • Confidence handling: explicit per-value confidence or evidence-derived confidence
  • Feedback: accept, reject, or override actions update user profiles
  • Typed schemas: Pydantic models for request and response contracts

Development

Run the full local verification suite:

pip install -e ".[dev]"
ruff check adi/
pytest
python -m build
twine check dist/*

Release And Publishing

License

MIT

Metadata

Release files for adi-decision 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adi-decision 0.1.1
File Size Uploaded
adi_decision-0.1.1.tar.gz 27.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adi-decision 0.1.1
File Interpreter ABI Platform
adi_decision-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 62.3 kB

Release files / adi_decision-0.1.1.tar.gz

Download URL adi_decision-0.1.1.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6683491d6bbaa31e6c9af05fa18f17fcc9c9d3237aaac5e208362e2531848770
BLAKE2b-256 checksum
How to use checksums
9eb1c3dda87a6203b21f46022dbe13cde377314397256321b2a4050e7cd63801
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.

Transparency log

Release files / adi_decision-0.1.1-py3-none-any.whl

Download URL adi_decision-0.1.1-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5f6abe34e8fcd678b882908659991eb04c5c8bbef99a6b7f796094f641a1403
BLAKE2b-256 checksum
How to use checksums
7d8e81ae378c788c26dafbe2227782ac51688483c69e31ad5fc91fa54fc7d432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page