Skip to main content

AgentRivet

AgentRivet is an agentic workflow for turning a HEP arXiv paper into a Rivet analysis routine. It combines deterministic paper and metadata lookup with a small set of focused LLM agents:

  • an Analyst agent that converts the paper into a structured analysis summary
  • a Coder agent that writes or revises the Rivet routine
  • a CodeReviewer agent that checks Rivet and C++ correctness
  • a PhysicsReviewer agent that checks physics fidelity against the analysis summary

What the package does

Given an arXiv identifier, AgentRivet:

  1. checks whether a Rivet routine already exists for the analysis
  2. downloads and extracts the paper text
  3. builds a structured analysis summary from the paper
  4. generates a Rivet C++ draft
  5. reviews that draft with two separate reviewers (Coder then Physicist)
  6. iterates up to a fixed number of review rounds
  7. writes the final .cc file and a review report

The important design choice is that the full paper text is used only by the Analyst agent. The iterative code-generation loop runs on the structured analysis summary plus the most recent review outputs, not on the full paper text every time.

Installation Notes

The package metadata is defined in [pyproject.toml].

Base dependencies listed there:

  • anthropic
  • arxiv
  • google-genai
  • openai
  • pydantic
  • pypdf
  • requests

Optional extras:

  • pytest for development

How to install from source

Set up in a Python virtual environment

python -m venv myPyEnv
source myPyEnv/bin/activate

then go to the AgentRivet directory and install the package using

pip install -e .

How to run

From inside the top level directory:

./agent-rivet -p anthropic

You will be prompted for an arXiv ID.

You can also pass the arXiv ID directly:

./agent-rivet -a 2511.15569 -p anthropic

You can choose a provider explicitly:

./agent-rivet -a 2511.15569 --provider anthropic
./agent-rivet -a 2511.15569 --provider google
./agent-rivet -a 2511.15569 --provider openai

You can also override the model:

./agent-rivet -a 2511.15569 --provider google --model gemini-3.1-pro-preview

Environment variables

agent-rivet detects the provider and model from either CLI flags or environment variables.

Supported environment variables:

  • LLM_PROVIDER
  • LLM_MODEL
  • GOOGLE_API_KEY
  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY

Examples:

export LLM_PROVIDER=google
export GOOGLE_API_KEY=...
./agent-rivet -a 2511.15569
export LLM_PROVIDER=openai
export LLM_MODEL=gpt-5
export OPENAI_API_KEY=...
./agent-rivet -a 2511.15569

If --model and LLM_MODEL are not supplied, utils.detect_provider() chooses a default model for the selected provider.

A more detailed discussion of the code structure can be found here

Metadata

Release files for AgentRivet 0.2.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 AgentRivet 0.2.0
File Size Uploaded
agentrivet-0.2.0.tar.gz 32.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AgentRivet 0.2.0
File Interpreter ABI Platform
agentrivet-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.7 kB

Release files / agentrivet-0.2.0.tar.gz

Download URL agentrivet-0.2.0.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
86e914c6d03c1cd6320451916277dc986a408dec187f670c1300d28d2b1a9707
BLAKE2b-256 checksum
How to use checksums
71fd8a088e42ff51aa6a7f59e1efb2507055c35abffb43424cbcf8618a27e6e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / agentrivet-0.2.0-py3-none-any.whl

Download URL agentrivet-0.2.0-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b2bab52231b3bd5c03f19edda97f37211ec08fb297bc46a3b4d7a632b850bc2
BLAKE2b-256 checksum
How to use checksums
39c29af29fdca7d1308ac390f5b2e72084deb27eda856a66e5da33cfbb1e21f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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