PyOD 3: Agentic Anomaly Detection Library
A comprehensive Python library for anomaly detection across tabular, time series, graph, text, image, and audio data, with 60+ detectors and agentic workflows.
Evidence shows the repository includes a security policy (SECURITY.md) and CodeQL workflow, but no specific implementation of least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security audit, external effects control, rollback mechanisms, or source attribution. Therefore all trust criteria score 0.
Self-consistency: README, pyproject.toml, and test configuration are largely consistent in version numbers, dependencies, and feature descriptions, but there are minor inconsistencies (e.g., README claims 61 detectors, pyproject description says 61, but code may differ). Dependency availability: requirements.txt lists core dependencies but lacks version pinning or integrity checks. Failure messages: No explicit error handling or user-friendly failure messages are documented in tests or docs.
Audience and scenarios: README details multiple usage scenarios (classic API, ADEngine, Agentic) and provides installation instructions for different agent stacks. Capability boundaries: Documentation lists supported modalities and detector counts but does not specify applicability conditions or limitations for each detector. Trigger precision: Clear API and CLI entry points are provided, but trigger conditions are not detailed. Environment fit: Supports multiple Python versions and OSes, but specific environment limitations are not mentioned.
Information architecture: README is well-structured with TOC, API reference, benchmarks, etc. Install notes: Detailed installation steps and multiple installation methods are provided. Naming stability: API naming is consistent, but naming conventions are not explicitly documented. Examples and FAQ: Extensive examples and documentation links are provided, but no FAQ section. Known limitations: Documentation mentions macOS torch performance issues but does not comprehensively list all limitations. License: BSD-2-Clause license is clear. Versioning changelog: CHANGES.txt link is provided but not directly visible in the repository. Maintenance responsibility: Author information is clear, but maintenance responsibilities are not specified.
Output usability: Clear APIs and examples are provided, but output format standardization is not documented. Marginal value: As a widely used library, it provides significant marginal value. Cost-benefit: No detailed analysis of performance or resource consumption is provided.
Claim traceability: Claims in README (e.g., download counts, benchmarks) have external links but no specific data. Cross-source corroboration: Multiple external benchmarks and publications are cited, but independent verification is not provided. Fact-inference separation: Documentation distinguishes facts (e.g., algorithm lists) from inferences (e.g., performance claims), but not explicitly labeled.
- No least privilege, user confirmation, or data flow transparency mechanisms are evident; caution is advised when using as an Agent product.
- Dependencies are not version-pinned, posing supply chain risks.
- Claims about detector counts and performance lack specific data support.
What does this agent do, and when should you use it?
PyOD is the most comprehensive and widely-used Python library for anomaly detection, with over 46 million downloads since its inception in 2017. PyOD 3 introduces ADEngine (lifecycle orchestration core) and the od-expert skill, enabling agents to drive anomaly detection investigations through natural conversation. The library includes 61 detectors covering tabular, time series, graph, text, image, and audio data, with benchmark-backed routing from ADBench, TSB-AD, BOND, and NLP-ADBench. The classic fit/predict API remains fully backward-compatible, while new MCP server and CLI tools provide agent integration paths.
PyOD 3 offers three layers of use: Classic API (manual detector selection), ADEngine (automatic detector selection, comparison, and assessment), and Agentic Investigation (natural language-driven). The library includes 61 detectors across tabular, time series, graph, text, image, and audio data, with a unified API. ADEngine orchestrates the full lifecycle from raw data to explained anomalies and next-step guidance. The od-expert skill integrates with Claude Code and Codex, converting natural language requests into ADEngine workflows. The MCP server (python -m pyod.mcp_server) exposes ten stateless tools spanning knowledge queries (list_detectors, explain_detector, compare_detectors, get_benchmarks), planning (profile_data, plan_detection, build_detector), and detection (run_detection, analyze_results, explain_findings). Additionally, the pyod CLI (pyod info, pyod install skill, pyod mcp serve) supports installation and diagnostics.
- Data scientists use the classic API to quickly detect outliers in tabular data with minimal code.
- Machine learning engineers use ADEngine to auto-select the best detector and benchmark performance.
- DevOps engineers integrate anomaly detection into monitoring pipelines via CLI or MCP.
- AI agents (e.g., Claude Code, Codex) use the od-expert skill for data quality checks and troubleshooting.
- Researchers reproduce benchmark experiments using PyOD's 61 detectors.
- Business analysts use MCP tools to analyze business data anomalies.
What are this agent's strengths and limitations?
- Multi-modal: supports tabular, time series, graph, text, image, and audio data with a single API.
- Agent-ready: od-expert skill and MCP server enable natural language-driven investigations.
- Widely adopted: 46M+ downloads, benchmark-backed, enterprise deployments (e.g., Walmart, Databricks).
- Some advanced features (e.g., stateful MCP tools) are deferred to future releases.
- Installation and activation involve multiple steps and dependencies on agent runtimes.
- Graph detectors are typically transductive, not supporting out-of-sample prediction.
How do you install or deploy this agent?
Install the core library via pip: pip install pyod. Then choose the activation path for your agent stack: 1) Claude Code or Codex: run pyod install skill (user-global) or pyod install skill --project (project-local); 2) MCP-compatible systems: install pyod[mcp] and run pyod mcp serve; 3) Pure Python: no extra steps.
How do you use this agent?
Example with Isolation Forest:
from pyod.models.iforest import IForest
clf = IForest()
clf.fit(X_train)
y_train_scores = clf.decision_scores_
y_test_scores = clf.decision_function(X_test)For agentic path, run pyod info to see version and activation status.