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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentrivet-0.2.0.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentrivet-0.2.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file agentrivet-0.2.0.tar.gz.

File metadata

  • Download URL: agentrivet-0.2.0.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for agentrivet-0.2.0.tar.gz
Algorithm Hash digest
SHA256 86e914c6d03c1cd6320451916277dc986a408dec187f670c1300d28d2b1a9707
MD5 f46866630c7ee05005056c4729fb03fe
BLAKE2b-256 71fd8a088e42ff51aa6a7f59e1efb2507055c35abffb43424cbcf8618a27e6e0

See more details on using hashes here.

File details

Details for the file agentrivet-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentrivet-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for agentrivet-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b2bab52231b3bd5c03f19edda97f37211ec08fb297bc46a3b4d7a632b850bc2
MD5 0590407eb887d0e069af469f92fc5e62
BLAKE2b-256 39c29af29fdca7d1308ac390f5b2e72084deb27eda856a66e5da33cfbb1e21f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page