Skip to content

Intelligent-CAT-Lab/Graphectory

Repository files navigation

Graphectory logo

Artifact repository for the paper [*Process-Centric Analysis of Agentic Software Systems*](https://dl.acm.org/doi/10.1145/3798271), accepted to the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2026).

Demo Video and Online Demo (Try it Out! 🚀)

Graphectory Walkthrough

Try the Live Demo Here!

Graphectory

Graphectory transforms agent execution traces into structured graphs that capture the problem-solving patterns of AI software engineering agents. By modeling agent actions as directed graphs with phase classification (localization, patching, validation), this tool enables systematic analysis of how agents solve software engineering tasks.

Graphectory is very easy to adopt (please see "Supporting New Agents" and "Supporting New SWE Agent Tools" in the ReadMe). If you have any question or need help, please post on the issue tracker with a sample of your trajectory and we would be happy to assist.

New: Beyond the two agent frameworks studied in the paper (SWE-agent and OpenHands), the repository additionally supports mini-swe-agent (v2.0.0, trajectory_format version mini-swe-agent-1.1; and trajectory_format version mini-swe-agent-1), a widely used scaffold in agentic research with over 3.3k GitHub stars. 


Dataset

Pre-computed Graphs: Full dataset (2 agents × 4 models) available under data/{OpenHands|SWE-agent}/graphs

Raw Trajectories: Hosted on Zenodo due to file size: https://zenodo.org/records/17364210


Installation

Docker (Recommended)

git clone git@github.com:Intelligent-CAT-Lab/Graphectory.git
cd Graphectory

We provide a Dockerfile which includes the pre-computed graphs and installs all necessary dependencies to reproduce the results of Graphectory. Please download Docker, and then build and run:

docker build -t graphectory .
docker run -it graphectory bash

Multi-platform: Works on Intel and Apple Silicon. For Apple Silicon, use:

docker build --platform linux/arm64 -t graphectory .

For Docker workflows, see DOCKER.md. If interested in interactive graph construction, see graph_construction/README.md.

Build Locally

Requires Python ≥ 3.12. We recommend using conda or virtual environments:

conda create -n graphectory python=3.12 && conda activate graphectory
python -m pip install -e .

PyGraphviz Note (Required for Live Visualization): On Windows, standard pip install often fails due to missing Graphviz C-libraries. Using conda is recommended:

conda install -c conda-forge pygraphviz

Otherwise, install Graphviz system binaries manually before python -m pip install -e .


Quick Start

Graphectory provides two tools for working with agent trajectories:

For detailed usage and configuration options, see graph_construction/README.md.


Graph Analysis

Pre-computed analysis results for the full dataset are available under data/{OpenHands|SWE-agent}/analysis, including Graphectory metrics.

Analyze Pre-computed Graphs

python -m graph_analysis.batch_runner

Analyze Custom Graphs

python -m graph_analysis.batch_runner --data-dir ./my_graphs --output-dir ./my_output

Results are saved to trajectory_metrics.csv.


Reproduce Graphectory Results

Precomputed graphs are provided under data/{OpenHands|SWE-agent}/graphs. The reproduction pipeline has three optional stages:

Generate Figures (Default)

Requires precomputed analysis in data/{agent}/analysis/{model}/:

bash scripts/reproduce.sh                    # Generate figures in figures/
bash scripts/reproduce.sh -o ./my_output    # Custom output directory

All paper figures (RQ1-RQ3):

  • RQ1: figures/median_iqr_trajectory_heatmap.png (Figure 3)
  • RQ2: figures/sankey_grid.png (Figure 7), figures/end_phase_donuts.png (Figure 8), figures/phase_transition_overview.png (Figure 9)
  • RQ3: figures/inefficiency_venn/*.pdf (Figures 14-15)

Optional: Graph Construction & Analysis

To generate graphs from raw trajectories (requires Zenodo data https://zenodo.org/records/17364210 or data/samples/):

# Generate graphs from trajectories
bash scripts/construct.sh <trajectories_path> <eval_report.json> [output_dir] [model]

# Analyze graphs and compute metrics
bash scripts/analyze.sh <data_dir> [output_dir] [--agent AGENT] [--model MODEL]

# Generate figures
bash scripts/reproduce.sh

For script usage and options:

bash scripts/construct.sh -h    # Show construct options
bash scripts/analyze.sh -h      # Show analyze options
bash scripts/reproduce.sh -h    # Show reproduce options

For interactive graph visualization, see graph_construction/README.md.

About

Tool and artifact of the paper "Process-Centric Analysis of Agentic Software Systems" [OOPSLA'26]

Topics

Resources

License

Stars

11 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors