Skip to main content

RooAgent

DOI PyPI Package latest release arXiv License: MIT Website

Author: Aman Desai

Talk to ROOT in plain English. RooAgent lets you run HEP analyses — histograms, event selection, fitting, significance scans — by typing what you want rather than writing code.

Under the hood, an LLM reads your prompt, picks the right analysis tool, fills in the arguments, and calls PyROOT. You get the result; ROOT does the work.

Two ways to use it:

  • LangGraph agent — a standalone chatbot; pick a provider via LLM_PROVIDER: Claude (default) or ChatGPT.
  • MCP server — drop it into a Claude/Codex CLI session.

Quick start

Install from PyPI:

pip install rooagent

Or from source:

git clone https://github.com/amanmdesai/RooAgent.git
cd RooAgent
pip install .

pip install . installs everything needed for both modes — no extras.

Operating modes

Claude / Anthropic (default)

Pick a provider via LLM_PROVIDER and set its key env var:

LLM_PROVIDER Key env var MODEL default
anthropic (default) ANTHROPIC_API_KEY claude-sonnet-5
openai OPENAI_API_KEY gpt-5.5

ROOAGENT_SEED (optional) sets the sampling seed. Default: 7.

export LLM_PROVIDER=anthropic   # default, can omit
export ANTHROPIC_API_KEY="..."
export MODEL=claude-sonnet-5    # optional override
export ROOAGENT_SEED=7          # optional sampling seed

To use OpenAI instead:

export LLM_PROVIDER=openai
export OPENAI_API_KEY="sk-..."

Claude CLI via MCP

git clone https://github.com/amanmdesai/RooAgent.git
cd RooAgent
pip install .
claude mcp add rooagent -- rooagent-mcp

Then navigate to your ROOT files and start Claude:

cd /path/to/your/root/files
claude

Codex CLI via MCP

git clone https://github.com/amanmdesai/RooAgent.git
cd RooAgent
pip install .

# Load ROOT first, replacing this path with your ROOT installation.
source /path/to/root/bin/thisroot.sh

ROOT_LIBDIR="$(root-config --libdir)"

codex mcp add rooagent \
  --env ROOTSYS="$ROOTSYS" \
  --env PATH="$ROOTSYS/bin:$PATH" \
  --env LD_LIBRARY_PATH="$ROOT_LIBDIR:${LD_LIBRARY_PATH:-}" \
  --env PYTHONPATH="$ROOT_LIBDIR:${PYTHONPATH:-}" \
  -- rooagent-mcp
  

If you previously registered RooAgent before loading ROOT, remove and re-add it:

codex mcp remove rooagent

What it can do

  • Inspection
  • Counting
  • Histograms
  • Plotting
  • Fitting
  • Variables
  • Statistics
  • Statistical Inference
  • Export

Requirements

  • Python >= 3.10
  • CERN ROOT >= 6.34 (built with RooFit/RooStats)

Dependencies

pandas, numpy, scipy, matplotlib, mcp[cli], typing_extensions, langchain-core, langgraph, langchain-anthropic, langchain-openai

How to cite

If you use RooAgent in your work, please cite:

@article{Desai:2026nmx,
    author = "Desai, Aman",
    title = "{RooAgent: An LLM Agent for Root-Based High Energy Physics Analysis}",
    eprint = "2605.17318",
    archivePrefix = "arXiv",
    primaryClass = "hep-ph",
    month = "5",
    year = "2026"
}

Release files for RooAgent 0.3.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 RooAgent 0.3.0
File Size Uploaded
rooagent-0.3.0.tar.gz 50.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for RooAgent 0.3.0
File Interpreter ABI Platform
rooagent-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 98.0 kB

Release files / rooagent-0.3.0.tar.gz

Download URL rooagent-0.3.0.tar.gz
Size 50.7 kB
Tags Source
SHA-256 checksum
How to use checksums
205b3749877ea1144383e519951b5e7a2577e0a203ab98c3dbcbc33fe48682f8
BLAKE2b-256 checksum
How to use checksums
7798bfde53321ae6fc2aa5e1c5604ae326354c31c16c01f5c90e8f2b1ec3e0c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / rooagent-0.3.0-py3-none-any.whl

Download URL rooagent-0.3.0-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e18141b5d18925493d4714aa6d157f96a45d700dd558784321489a80f0230b8d
BLAKE2b-256 checksum
How to use checksums
2227666ef67d7a9351b2cbc017d4357978fc8d89d9b4596ad3226bfb084a40f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.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