OpenAI builds and deploys advanced AI models like GPT-4o for autonomous agents and workflows.
AgentDiff
About AgentDiff
AgentDiff performs trajectory regression testing for AI agents by comparing a candidate run against a stored baseline as a directed acyclic graph. It measures divergence, wasted effort, loops, cost deltas, and recovery ratios to identify silent failures such as tool loops, cost spikes, or slow error recovery before deployment. The tool integrates with CI/CD pipelines via a CLI, pytest plugin, or GitHub Action, blocking pull requests when predefined thresholds are exceeded. It supports multiple agent frameworks and trace formats through built-in adapters, including LangGraph, CrewAI, OpenAI Agents, Langfuse, and LangSmith. Reports are generated as JSON, enabling automated gates without manual assertions. The approach targets cases where traditional static tests pass despite behavioral drift, such as redundant tool calls or inefficient error handling that inflate costs or latency.
Key features
- DAG-based trajectory comparison
- Five regression metrics (divergence, wasted effort, loops, cost, recovery)
- Built-in adapters for LangGraph, CrewAI, OpenAI Agents, Langfuse, LangSmith
- CLI, pytest plugin, and GitHub Action integration
- Configurable regression thresholds in CI/CD
- JSON-based trace ingestion and reporting
- Automated PR comments on regression detection
- OpenInference and generic JSON trace support
Use cases
- Validating agent refactoring or model upgrades in CI
- Detecting tool loops or redundant calls that inflate costs
- Ensuring consistent error recovery behavior across deployments
Pros
- Compares agent runs as DAGs to detect behavioral drift
- Integrates with CI/CD via CLI, pytest plugin, or GitHub Action
- Supports multiple agent frameworks and trace formats
- Provides quantitative metrics (divergence, loops, cost, recovery)
- Blocks regressions in pull requests based on configurable thresholds
Cons
- No free tier or open-source alternative mentioned
- Requires pre-existing baseline traces for comparison
- Limited to Python-based agent frameworks
- No support for non-JSON trace formats without adapters
Frequently asked questions about AgentDiff
What does AgentDiff do?
AgentDiff performs trajectory regression testing for AI agents by comparing a candidate run against a stored baseline as a directed acyclic graph (DAG). It identifies silent failures such as tool loops, cost spikes, or slow error recovery before deployment.
Who is AgentDiff designed for?
AgentDiff is designed for teams developing AI agents who need to detect behavioral drift, inefficiencies, or regressions that traditional static tests might miss. It is particularly useful for those using agent frameworks like LangGraph, CrewAI, or OpenAI Agents.
How does AgentDiff integrate with CI/CD pipelines?
AgentDiff integrates with CI/CD pipelines via a CLI, pytest plugin, or GitHub Action. It blocks pull requests when predefined thresholds for metrics like divergence, loops, or cost deltas are exceeded, ensuring regressions are caught before merging.
What metrics does AgentDiff use to evaluate agent runs?
AgentDiff evaluates runs using five metrics: Trajectory Divergence Index (TDI), Wasted Effort Index (WEI), Loop Detection, Resource Deltas (cost, tokens, latency), and Recovery Step Ratio (RSR). These metrics are computed deterministically in under 10ms.
Does AgentDiff require LLM calls to function?
No, AgentDiff does not require LLM calls to function. It operates locally-first with zero LLM judge latency, making it air-gapped and efficient for CI/CD environments.
What agent frameworks and trace formats does AgentDiff support?
AgentDiff supports multiple agent frameworks and trace formats through built-in adapters, including LangGraph, CrewAI, OpenAI Agents, Langfuse, and LangSmith. It also supports generic JSON traces and OpenInference formats.