Answer 'why did the agent do that?' with saliency, rationale, and counterfactuals
Project description
motive
Answer why did the agent do that? with empirically-grounded explanations for AI agent decisions.
motive uses hierarchical occlusion saliency: mask segments of the input context, measure how much each one affects the model's decision, and surface ranked importance scores and counterfactual what-ifs. No model self-reports. No local weights required. Works with any OpenAI-compatible endpoint.
Installation
pip install motive
Quickstart
from openai import AsyncOpenAI
from motive import SaliencyEngine, Segment
engine = SaliencyEngine(
client=AsyncOpenAI(base_url="...", api_key="..."),
model="your-model",
)
result = engine.explain(messages=messages, segments=segments, tools=tools)
print(result.summary())
See examples/demo_saliency.py for a full working example.
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 motive-0.0.2.tar.gz.
File metadata
- Download URL: motive-0.0.2.tar.gz
- Upload date:
- Size: 82.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cdc9dfbc524199d0818cebd7d6c324a06f40b31200c808a5e926eb2bfe1dc3f
|
|
| MD5 |
8f16a0a6bda576cc90f95e7007f599cb
|
|
| BLAKE2b-256 |
5d04bb2b51e6ec1d84058d4ec545146f458253eaab93ddadde4c014277b4e62a
|
Provenance
The following attestation bundles were made for motive-0.0.2.tar.gz:
Publisher:
publish.yml on VectorInstitute/motive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
motive-0.0.2.tar.gz -
Subject digest:
6cdc9dfbc524199d0818cebd7d6c324a06f40b31200c808a5e926eb2bfe1dc3f - Sigstore transparency entry: 1732687021
- Sigstore integration time:
-
Permalink:
VectorInstitute/motive@28410d8d03fc7699bd281829586cb48d7c750023 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/VectorInstitute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@28410d8d03fc7699bd281829586cb48d7c750023 -
Trigger Event:
push
-
Statement type:
File details
Details for the file motive-0.0.2-py3-none-any.whl.
File metadata
- Download URL: motive-0.0.2-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554764657ec34d2aee7a1907949ef1d8e1fdc3532e46a5181bb36989d06770a5
|
|
| MD5 |
d0e3b1902c0b2834938c495c6150bf02
|
|
| BLAKE2b-256 |
72a420c4b332bcac95380b8473d13149ef7d7dcb1af560145d5f1095471f50de
|
Provenance
The following attestation bundles were made for motive-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on VectorInstitute/motive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
motive-0.0.2-py3-none-any.whl -
Subject digest:
554764657ec34d2aee7a1907949ef1d8e1fdc3532e46a5181bb36989d06770a5 - Sigstore transparency entry: 1732687094
- Sigstore integration time:
-
Permalink:
VectorInstitute/motive@28410d8d03fc7699bd281829586cb48d7c750023 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/VectorInstitute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@28410d8d03fc7699bd281829586cb48d7c750023 -
Trigger Event:
push
-
Statement type: