Skip to main content

EntroPy

Behavioral evaluation framework for non-deterministic AI agents.

Measures what other frameworks miss: uncertainty, drift, stochastic behavior, and emergent failures — via Monte Carlo evaluation over repeated runs and entropy-based metrics. Framework-agnostic, local-first, zero vendor lock-in.

Install

pip install entropy-ai                 # from PyPI — core (pandas, matplotlib, jinja2, rich, pyyaml)
pip install "entropy-ai[langchain]"    # optional: a framework adapter
pip install "entropy-ai[pdf,jupyter]"  # optional: PDF / Jupyter reports

Developing EntroPy itself? Clone the repo and use an editable install instead:

pip install -e .                       # editable install from the repo
pip install -e ".[pdf,jupyter]"        # + report extras (what CI installs)

Quick start

from entropy import evaluate

def my_agent(inp): ...
    # just return the output — no boilerplate needed

# One line. Pass raw inputs; success = "didn't error" by default.
results = evaluate(my_agent, ["q1", "q2", "q3"], trials=100)
print(results)   # success_rate, behavioral_entropy, drift_score, ...

Need more control? Everything above is just sugar over Suite:

from entropy import Suite, Dataset, Case

dataset = Dataset([Case(input="q1", expected="correct answer")])
results = Suite(seed=42).run(my_agent, dataset, trials=100)

evaluate / Suite.run accept a list of raw inputs, a {input: expected} dict, or a Dataset — and a shared check= callable as the success criterion.

The canonical output (spec §9 / §21) includes: success_rate, reliability, variance, robustness, entropy, confidence_interval, behavioral_entropy, behavioral_variance, trajectory_entropy, trajectory_diversity, tool_reliability, drift_score, goal_stability, recovery_score, emergent_behavior, and more. 56 metrics total; entropy.default_metrics() lists the canonical set.

Tracing

from entropy import trace, event, instrument
with trace() as t:
    event("action", "tool:search")
# or auto-wrap any agent:
wrapped = instrument(my_agent)          # returns an AgentRun per call

Custom metrics (plugin system)

from entropy import metric
@metric("my_metric")
class MyMetric:
    def compute(self, batch): ...       # batch has outputs/events/successes/costs/...

Simulation, Chaos, Observability

from entropy import AdversarialSimulator, ChaosRunner, Watcher
adv = AdversarialSimulator(seed=0)
for v in adv.iterate("book a flight"):
    print(v)                            # typo / injection / distraction / leak variants

ChaosRunner(seed=0).run(agent, dataset, ["api_fail", "timeout"])   # fault injection
Watcher(agent, dataset, trials=20).watch(rounds=10)                # live drift + anomalies

Framework adapters (lazy)

from entropy import from_langchain, from_langgraph, from_openai, from_custom
runnable = from_langchain(my_langchain_agent)   # maps framework runs -> AgentRun

All 9 adapters (LangChain, LangGraph, OpenAI Agents, CrewAI, PydanticAI, AutoGen, Google ADK, MCP, custom) import their framework lazily, so import entropy works with none of them installed.

CLI

entropy init                      # scaffold a project
entropy run    --agent m:a --dataset d.json --trials 100
entropy test   --agent m:a --dataset d.json --baseline base.json [--update]
entropy benchmark --agents m:a m:b --dataset d.json
entropy chaos   --agent m:a --dataset d.json --faults api_fail,timeout
entropy simulate --kind adversarial --text "book a flight"
entropy ui      --agent m:a --dataset d.json --serve
entropy watch   --agent m:a --dataset d.json --rounds 10
entropy report  --results r.json --format html
entropy dataset --path d.json
entropy doctor                      # check optional deps

Reports

from entropy import export_report
export_report(results, "html", "report.html")      # also: json, markdown, pdf, jupyter

Layout

core/ (models, tracing, exporters, suite) · metrics/ (registry + all categories) · datasets/ · simulation/ · chaos/ · regression/ · benchmarks/ · observability/ · reports/ · dashboard/ · integrations/ (adapters) · cli/ · plugins/.

Tests: python -m pytest tests/.

Documentation

  • Live site: https://satyamsingh8306.github.io/entropy-ai/

  • Source: docs/ — plain HTML/CSS/JS with no build step, deployed to GitHub Pages.

  • Source: docs/index.html, docs/guide/*.html, docs/api.html, docs/examples.html, plus docs/assets/ (CSS, JS, logo, search index).

  • Local preview: serve the folder, e.g. python -m http.server -d docs 8000 then open http://localhost:8000.

  • Deploy: push to main; the .github/workflows/pages.yml workflow uploads docs/ and publishes it via GitHub Pages. Alternatively, set Settings → Pages → Build and deployment → Source to Deploy from a branch and choose the main branch /docs folder.

Metadata

Release files for entropy-ai 0.1.3

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

Source distribution (sdist)

Source distribution for entropy-ai 0.1.3
File Size Uploaded
entropy_ai-0.1.3.tar.gz 43.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for entropy-ai 0.1.3
File Interpreter ABI Platform
entropy_ai-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 97.7 kB

Release files / entropy_ai-0.1.3.tar.gz

Download URL entropy_ai-0.1.3.tar.gz
Size 43.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a82bb60d345245c0a402dad6b770a7939a4da5b03e1b9437d5611df61710e013
BLAKE2b-256 checksum
How to use checksums
36595bf29d548aeb58ecc53b2dee94c8b17c07afe47e66db5b963b2fb98602fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / entropy_ai-0.1.3-py3-none-any.whl

Download URL entropy_ai-0.1.3-py3-none-any.whl
Size 54.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be0114a06b0d288b03ba18cf9bbf445d95bed77a333b2aec280e864af87f1765
BLAKE2b-256 checksum
How to use checksums
8006469b8871744252830b1285e2c57d3975810397b8e324356ebc5333293a9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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