Metadata-Version: 2.4
Name: ariadx
Version: 0.1.0
Summary: ARIA — diagnose why AI agents fail. Failure taxonomy, requirement-aware evaluation, factual grounding, and trace diagnosis for LLM agents.
Author-email: Ayush Singh <k2aserendipity@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/AyushSingh110/ARIA
Project-URL: Documentation, https://github.com/AyushSingh110/ARIA/tree/main/docs
Project-URL: Repository, https://github.com/AyushSingh110/ARIA
Project-URL: Issues, https://github.com/AyushSingh110/ARIA/issues
Keywords: llm-agents,agent-evaluation,agent-reliability,failure-detection,failure-diagnosis,hallucination-detection,observability,langgraph,dspy,ai-safety
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: langgraph<0.3.0,>=0.2.0
Requires-Dist: langchain<0.4.0,>=0.3.0
Requires-Dist: langchain-core<0.4.0,>=0.3.0
Requires-Dist: langchain-groq<0.3.0,>=0.2.0
Requires-Dist: langchain-ollama<0.3.0,>=0.2.0
Requires-Dist: pydantic<3.0.0,>=2.7.0
Requires-Dist: pydantic-settings<3.0.0,>=2.3.0
Requires-Dist: sentence-transformers<4.0.0,>=3.0.0
Requires-Dist: rich<14.0.0,>=13.7.0
Requires-Dist: click<9.0.0,>=8.1.0
Requires-Dist: httpx<0.28.0,>=0.27.0
Requires-Dist: ddgs>=6.0.0
Requires-Dist: python-dotenv<2.0.0,>=1.0.0
Requires-Dist: numpy<3.0.0,>=1.26.0
Requires-Dist: dspy-ai>=2.4.0
Requires-Dist: xgboost<3.0.0,>=2.0.0
Requires-Dist: scikit-learn<2.0.0,>=1.4.0
Provides-Extra: api
Requires-Dist: fastapi>=0.110; extra == "api"
Requires-Dist: uvicorn[standard]>=0.29; extra == "api"
Requires-Dist: requests>=2.31; extra == "api"
Provides-Extra: dev
Requires-Dist: pytest>=8.2.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"

# ariadx

**Diagnose *why* AI agents fail — not just *that* they failed.**

ARIA (Autonomous Reflective Intelligence Architecture) ingests any agent trace — LangGraph, OpenAI, or raw tool calls — and produces a structured failure report: which requirements were missed, what behavioral failure occurred, and what to fix.

```bash
pip install ariadx
```

## Three-line diagnosis

```python
from aria.sdk import diagnose

report = diagnose(
    task="Find the population of France and save it to population.txt",
    tool_calls=[{"tool_name": "web_search",
                 "tool_args": {"query": "population of France"},
                 "tool_result": "67.8 million (2024 estimate)..."}],
    final_output="The population of France is 67.8 million.",
)
print(report["failure_class"])               # e.g. "goal_misalignment"
print(report["requirement_satisfaction"])    # e.g. 0.5 — file was never saved
```

## What you get back

```json
{
  "failure_class": "goal_misalignment",
  "confidence": 0.84,
  "requirement_satisfaction": 0.43,
  "requirements": ["calculate compound interest", "show the formula", "save to results.txt"],
  "requirements_satisfied": [true, true, false],
  "evidence": ["Requirement not satisfied: 'save to results.txt'"],
  "suggested_action": "Add explicit success criteria and require the agent to verify them."
}
```

## Failure taxonomy

| Class | What it means |
|---|---|
| `prompt_drift` | Trajectory diverges from the original goal over turns |
| `tool_misuse` | Wrong tool, wrong args, or tool errors |
| `context_overflow` | Repeats completed steps; context lost |
| `hallucination_loop` | Asserts facts without grounding (caught by independent web verification) |
| `goal_misalignment` | Task "completed" but requirements not satisfied |

## Validated on real data

- **91%+ failure-detection precision** on the GAIA benchmark
- **78% human agreement** on failure classification (50 human-labeled real-world runs)
- Built on a 5-class behavioral failure taxonomy validated across 1,200 synthetic + 90 real agent traces

## Framework adapters

```python
from adapters.langgraph_adapter import diagnose_langgraph_trace
from adapters.openai_adapter import diagnose_openai_trace
```

## Runtime API + dashboard

```bash
pip install "ariadx[api]"
uvicorn api.main:app --port 8000     # REST API with /diagnose, /run, /feedback, /dashboard
```

## Links

- **Source & docs:** https://github.com/AyushSingh110/ARIA
- **License:** Apache 2.0
- **Research:** paper targeting ICLR 2026 workshop / ACL 2026 System Demonstrations
