Multi-agent framework for generating Rivet analysis routines using large language models
Project description
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
Analystagent that converts the paper into a structured analysis summary - a
Coderagent that writes or revises the Rivet routine - a
CodeRevieweragent that checks Rivet and C++ correctness - a
PhysicsRevieweragent that checks physics fidelity against the analysis summary
What the package does
Given an arXiv identifier, AgentRivet:
- checks whether a Rivet routine already exists for the analysis
- downloads and extracts the paper text
- builds a structured analysis summary from the paper
- generates a Rivet C++ draft
- reviews that draft with two separate reviewers (Coder then Physicist)
- iterates up to a fixed number of review rounds
- writes the final
.ccfile 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:
arxivpydanticpypdf
Optional extras:
openaigoogle-genaianthropicpytestfor development
The runtime code also imports requests, so your environment must provide that package as well.
How to install from source
Set up in a Python virtual environment
python -m venv myPyEnv
source myPyEnv/bin/activate
then install the package using
pip install -e .
How to run
From inside the top level directory:
./agent-rivet
You will be prompted for an arXiv ID.
You can also pass the arXiv ID directly:
./agent-rivet -a 2511.15569
You can choose a provider explicitly:
./agent-rivet -a 2511.15569 --provider google
./agent-rivet -a 2511.15569 --provider openai
./agent-rivet -a 2511.15569 --provider anthropic
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_PROVIDERLLM_MODELGOOGLE_API_KEYOPENAI_API_KEYANTHROPIC_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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentrivet-0.1.0.tar.gz.
File metadata
- Download URL: agentrivet-0.1.0.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa6e226e8eb525640ecfe724737d46ab2051275752a5f6527dfa2132c5d6a96
|
|
| MD5 |
4b853d62482a940330d86253311b3c9c
|
|
| BLAKE2b-256 |
c4ad608884fee53a4f765bb8e1c917d56ff8288c968a0c0f01e8b0df26691f7f
|
File details
Details for the file agentrivet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentrivet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7091138241541e3e523f9341f27dacad09f153126e429d9d3d19b56096783cd
|
|
| MD5 |
5841b64ea083e55a148015b94caacd8c
|
|
| BLAKE2b-256 |
e6b2b75b3d39025672fb58241c78f7d3b22b2a06da3e949074f2545d228fcac1
|