Skip to main content

Andrey: accelerated, accurate, agentic causal discovery

PyPI version CI status Python 3.11, 3.12, 3.13, 3.14 License: Apache 2.0


⭐ What's new in 0.15.0

Multi-domain data come from several environments, such as sites, batches, or the conditions of an experiment, that share one causal structure and differ in the mechanisms of some variables. With each row's environment recorded as an environment index, a method can tell a dependence that changing mechanisms create from a causal edge, and it can orient edges that one environment leaves undirected. FCI-JCI learns from these data while allowing hidden common causes, BOSS-FCI and GRaSP-FCI allow them too, and J-PCMCI+ learns from time series of several datasets. In our comparisons with their authors' code, in the settings their papers study, none of the four made significantly more errors, and each was faster. GES, hill climbing, Tabu search, GFCI, BOSS, GRaSP, BOSS-FCI, and GRaSP-FCI take the environment too, as an experimental option.

Read the post · See the release card


Andrey is a causal discovery package for Python.

  • Fast: The fastest causal discovery package.
  • Accurate: more than 80% fewer errors than other popular packages.
  • One API: 44 supported methods, each one function call.
  • Any data: continuous, categorical, mixed, time series, nonlinear, hidden confounders.
  • Agent-ready: a command line that answers in JSON, and a skill for coding agents.
uv add andrey-core
pip install andrey-core

You install andrey-core and then import andrey.

  • Optional extras: andrey-core[torch] for GPUs and CALM, andrey-core[viz] for charts and graph layouts
  • From GitHub, the latest release: uv add "andrey-core @ git+https://github.com/Abel-ai-lab/andrey@main"
  • Installation guide: the extras, a PyTorch build for your GPU, and building Andrey from source

Andrey: accelerated, accurate, agentic. 44 supported methods. Data types: continuous,
      categorical, mixed, time series, nonlinear. Real data processing: missing values,
      background knowledge, edge confidence. Graphs: DAG, CPDAG, PAG, temporal; hidden
      confounders. Acceleration: parallel CPU; GPU with PyTorch (CUDA). Portability: NetworkX,
      pcalg, Graphviz DOT, NumPy. Interface: Python, CLI, skill.

Release cards

What's inside

Family Methods Returns
Constraint-based pc, fci, gfci, cdnod, fci_jci, icp, iamb, inter_iamb, mmpc CPDAG, PAG, DAG, Undirected graph
Score-based ges, gies, gnies, xges, hc, tabu, exact_search, calm, notears*, dagma*, mmhc, rsmax2 CPDAG, DAG
Permutation-based boss, grasp, boss_fci, grasp_fci, igsp, ut_igsp CPDAG, PAG
Functional causal models direct_lingam, ica_lingam, multi_group_direct_lingam, cam, resit DAG
Temporal causal discovery varma_lingam, longitudinal_lingam, pcmci, pcmciplus, jpcmciplus, lpcmci, granger, dynotears Temporal graph
Latent variables gin, rcd, bottom_up_parce_lingam, camuv DAG, PAG
Pairwise direction anm, pnl Two-node DAG

* Experimental: no published benchmark yet, and the API may change.

Quick start

Learn the protein-signaling network of Sachs et al. (2005) from 853 cells, and score it against the known network:

import andrey
from andrey.data import load_dataset
from andrey.metrics import score

sachs = load_dataset("sachs")  # 853 cells, 11 proteins, and the known network
out = andrey.pc(sachs.data)    # learn a graph
print(out)

scores = score(out.structure, sachs.graph)
print({k: round(scores[k], 2) for k in ("shd", "skeleton_precision", "skeleton_recall")})
pc  cpdag  |  11 nodes  |  8 edges (6 undirected, 2 directed)

  raf -- mek
  plc -- pip3
  pip2 -- pip3
  erk -- akt
  erk -- pka
  akt -- pka
  p38 -> pkc
  jnk -> pkc

  indep_test: fisherz
  tie_break: rank
{'shd': 11, 'skeleton_precision': 1.0, 'skeleton_recall': 0.47}

PC finds 8 edges, all among the known network's 17. The structural Hamming distance (SHD) counts the edges to add, remove, or reorient to reach the known network: 11 here (9 edges are missing, and 2 are oriented where the known network's CPDAG leaves them undirected), and 17 for a graph with no edges.

For your own data, pass a pandas DataFrame or a NumPy array: one row per sample, one column per variable. From a shell or an agent:

andrey run pc --data your_data.csv   # JSON when piped, a summary in a terminal

To give your coding agent Andrey's skill, paste this prompt into it:

Install Andrey's agent skill: make sure the andrey-core package is installed, run
`andrey --skill`, and save its output as andrey/SKILL.md in your skills folder.

Learn more

Andrey is in alpha: the API may change between releases, so pin the version you use. Linux is supported; macOS and Windows install and run on the CPU, with no guarantee yet (Testing). Apple GPUs are not supported in the alpha.

Citing, license, contributing

If you use Andrey in your work, please cite it, or use the citation file:

@software{andrey,
  author = {{Abel AI Lab}},
  title = {Andrey: Accelerated, accurate, agentic causal discovery},
  year = {2026},
  version = {0.15.0},
  url = {https://andrey.abel.ai},
}

Andrey is released under the Apache License 2.0. Bug reports and pull requests are welcome in the issue tracker; the contributing guide explains how to set up a development environment.

Andrey is inspired by causal-learn, pgmpy, Tetrad, and many other causal discovery packages.

Metadata

Release files for andrey-core 0.15.0

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

Source distribution (sdist)

Source distribution for andrey-core 0.15.0
File Size Uploaded Provenance Actions
andrey_core-0.15.0.tar.gz 889.6 kB With provenance Details for andrey_core-0.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for andrey-core 0.15.0
File Interpreter ABI Platform Actions
andrey_core-0.15.0-py3-none-any.whl Python 3 none any Details for andrey_core-0.15.0-py3-none-any.whl

Total release size: 1.9 MB

Release files / andrey_core-0.15.0.tar.gz

Download URL andrey_core-0.15.0.tar.gz
Size 889.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2cd348e0242c0b50e584194b30e8ca3919bf3e4009f76eb66c271f8668d27977
BLAKE2b-256 checksum
How to use checksums
e75fdb25c2f0dd9c9fa1dccdf8a404adb817c8a65f92fbd4096cdffecbc52f1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Release files / andrey_core-0.15.0-py3-none-any.whl

Download URL andrey_core-0.15.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
af3f09ba7acd94da156bf8bf0a73ce24aa5b109a2d51e14e4923230114e3c831
BLAKE2b-256 checksum
How to use checksums
5e6de4d87776d03249aaedda7c8f6f4737ba5271cf6cfd81863f483bd5e0848d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Security for andrey-core 0.15.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for andrey_core-0.15.0.tar.gz

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 Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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