Structured multi-criteria decision intelligence for Python applications and LLM agents.
Project description
ADI — Agent Decision Intelligence
Rank options, quantify confidence, and explain the decision.
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 /healthPOST /decideGET /policiesGET /policies/{policy_name}
Core Features
- Policies:
balanced,risk_averse, andexploratory - 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
- Changelog: CHANGELOG.md
- Publishing guide: docs/PUBLISHING.md
- GitHub Releases: github.com/dimgouso/adi-Agent-Decision-Intelligence/releases
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adi_decision-0.1.1.tar.gz.
File metadata
- Download URL: adi_decision-0.1.1.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6683491d6bbaa31e6c9af05fa18f17fcc9c9d3237aaac5e208362e2531848770
|
|
| MD5 |
04525b0cf81c5e78716f83acbba8658e
|
|
| BLAKE2b-256 |
9eb1c3dda87a6203b21f46022dbe13cde377314397256321b2a4050e7cd63801
|
Provenance
The following attestation bundles were made for adi_decision-0.1.1.tar.gz:
Publisher:
release.yml on dimgouso/adi-Agent-Decision-Intelligence
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adi_decision-0.1.1.tar.gz -
Subject digest:
6683491d6bbaa31e6c9af05fa18f17fcc9c9d3237aaac5e208362e2531848770 - Sigstore transparency entry: 1006602068
- Sigstore integration time:
-
Permalink:
dimgouso/adi-Agent-Decision-Intelligence@29af98e9f262c46475bc56378b45d19fc238bbdd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dimgouso
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@29af98e9f262c46475bc56378b45d19fc238bbdd -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file adi_decision-0.1.1-py3-none-any.whl.
File metadata
- Download URL: adi_decision-0.1.1-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5f6abe34e8fcd678b882908659991eb04c5c8bbef99a6b7f796094f641a1403
|
|
| MD5 |
61e8e382bda23edfe9197c738637a96b
|
|
| BLAKE2b-256 |
7d8e81ae378c788c26dafbe2227782ac51688483c69e31ad5fc91fa54fc7d432
|
Provenance
The following attestation bundles were made for adi_decision-0.1.1-py3-none-any.whl:
Publisher:
release.yml on dimgouso/adi-Agent-Decision-Intelligence
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adi_decision-0.1.1-py3-none-any.whl -
Subject digest:
f5f6abe34e8fcd678b882908659991eb04c5c8bbef99a6b7f796094f641a1403 - Sigstore transparency entry: 1006602071
- Sigstore integration time:
-
Permalink:
dimgouso/adi-Agent-Decision-Intelligence@29af98e9f262c46475bc56378b45d19fc238bbdd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dimgouso
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@29af98e9f262c46475bc56378b45d19fc238bbdd -
Trigger Event:
workflow_dispatch
-
Statement type: