AgentRivet 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentrivet-0.1.0/AgentRivet.egg-info/PKG-INFO +163 -0
- agentrivet-0.1.0/AgentRivet.egg-info/SOURCES.txt +25 -0
- agentrivet-0.1.0/AgentRivet.egg-info/dependency_links.txt +1 -0
- agentrivet-0.1.0/AgentRivet.egg-info/entry_points.txt +2 -0
- agentrivet-0.1.0/AgentRivet.egg-info/requires.txt +17 -0
- agentrivet-0.1.0/AgentRivet.egg-info/top_level.txt +1 -0
- agentrivet-0.1.0/COPYING +674 -0
- agentrivet-0.1.0/PKG-INFO +163 -0
- agentrivet-0.1.0/README.md +125 -0
- agentrivet-0.1.0/agents/__init__.py +17 -0
- agentrivet-0.1.0/agents/analyst_agent.py +132 -0
- agentrivet-0.1.0/agents/cli.py +108 -0
- agentrivet-0.1.0/agents/code_reviewer_agent.py +115 -0
- agentrivet-0.1.0/agents/coder_agent.py +112 -0
- agentrivet-0.1.0/agents/core.py +242 -0
- agentrivet-0.1.0/agents/memory.py +176 -0
- agentrivet-0.1.0/agents/physics_reviewer_agent.py +94 -0
- agentrivet-0.1.0/agents/providers/anthropic_backend.py +52 -0
- agentrivet-0.1.0/agents/providers/google_backend.py +49 -0
- agentrivet-0.1.0/agents/providers/openai_backend.py +35 -0
- agentrivet-0.1.0/pyproject.toml +69 -0
- agentrivet-0.1.0/setup.cfg +4 -0
- agentrivet-0.1.0/tests/test_agent.py +23 -0
- agentrivet-0.1.0/tests/test_factory.py +12 -0
- agentrivet-0.1.0/tests/test_memory.py +75 -0
- agentrivet-0.1.0/tests/test_review_loop.py +76 -0
- agentrivet-0.1.0/tests/test_utils.py +43 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: AgentRivet
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Multi-agent framework for generating Rivet analysis routines using large language models
|
|
5
|
+
License-Expression: GPL-3.0-or-later
|
|
6
|
+
Project-URL: Homepage, https://gitlab.com/hepcedar/AgentRivet
|
|
7
|
+
Project-URL: Repository, https://gitlab.com/hepcedar/AgentRivet
|
|
8
|
+
Project-URL: Documentation, https://gitlab.com/hepcedar/AgentRivet
|
|
9
|
+
Project-URL: Issues, https://gitlab.com/hepcedar/AgentRivet/-/issues
|
|
10
|
+
Project-URL: Archived release (Zenodo), https://doi.org/10.5281/zenodo.20646340
|
|
11
|
+
Keywords: particle physics,HEP,Rivet,LLM,AI,Agentic AI,analysis preservation
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: COPYING
|
|
24
|
+
Requires-Dist: arxiv
|
|
25
|
+
Requires-Dist: pydantic
|
|
26
|
+
Requires-Dist: pypdf
|
|
27
|
+
Requires-Dist: requests
|
|
28
|
+
Provides-Extra: anthropic
|
|
29
|
+
Requires-Dist: anthropic; extra == "anthropic"
|
|
30
|
+
Provides-Extra: google
|
|
31
|
+
Requires-Dist: google-genai; extra == "google"
|
|
32
|
+
Provides-Extra: openai
|
|
33
|
+
Requires-Dist: openai; extra == "openai"
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: openai; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
`AgentRivet` is an agentic workflow for turning a HEP arXiv paper into a Rivet analysis routine.
|
|
43
|
+
It combines deterministic paper and metadata lookup with a small set of focused LLM agents:
|
|
44
|
+
|
|
45
|
+
- an `Analyst` agent that converts the paper into a structured analysis summary
|
|
46
|
+
- a `Coder` agent that writes or revises the Rivet routine
|
|
47
|
+
- a `CodeReviewer` agent that checks Rivet and C++ correctness
|
|
48
|
+
- a `PhysicsReviewer` agent that checks physics fidelity against the analysis summary
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## What the package does
|
|
52
|
+
|
|
53
|
+
Given an arXiv identifier, `AgentRivet`:
|
|
54
|
+
|
|
55
|
+
1. checks whether a Rivet routine already exists for the analysis
|
|
56
|
+
2. downloads and extracts the paper text
|
|
57
|
+
4. builds a structured analysis summary from the paper
|
|
58
|
+
5. generates a Rivet C++ draft
|
|
59
|
+
6. reviews that draft with two separate reviewers (Coder then Physicist)
|
|
60
|
+
7. iterates up to a fixed number of review rounds
|
|
61
|
+
8. writes the final `.cc` file and a review report
|
|
62
|
+
|
|
63
|
+
The important design choice is that the full paper text is used only by the Analyst agent.
|
|
64
|
+
The iterative code-generation loop runs on the structured analysis summary plus the most recent review outputs,
|
|
65
|
+
not on the full paper text every time.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## Installation Notes
|
|
69
|
+
|
|
70
|
+
The package metadata is defined in [`pyproject.toml`].
|
|
71
|
+
|
|
72
|
+
Base dependencies listed there:
|
|
73
|
+
|
|
74
|
+
- `arxiv`
|
|
75
|
+
- `pydantic`
|
|
76
|
+
- `pypdf`
|
|
77
|
+
|
|
78
|
+
Optional extras:
|
|
79
|
+
|
|
80
|
+
- `openai`
|
|
81
|
+
- `google-genai`
|
|
82
|
+
- `anthropic`
|
|
83
|
+
- `pytest` for development
|
|
84
|
+
|
|
85
|
+
The runtime code also imports `requests`, so your environment must provide that package as well.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## How to install from source
|
|
89
|
+
|
|
90
|
+
Set up in a Python virtual environment
|
|
91
|
+
```bash
|
|
92
|
+
python -m venv myPyEnv
|
|
93
|
+
source myPyEnv/bin/activate
|
|
94
|
+
```
|
|
95
|
+
then install the package using
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pip install -e .
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## How to run
|
|
102
|
+
|
|
103
|
+
From inside the top level directory:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
./agent-rivet
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
You will be prompted for an arXiv ID.
|
|
110
|
+
|
|
111
|
+
You can also pass the arXiv ID directly:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
./agent-rivet -a 2511.15569
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
You can choose a provider explicitly:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
./agent-rivet -a 2511.15569 --provider google
|
|
121
|
+
./agent-rivet -a 2511.15569 --provider openai
|
|
122
|
+
./agent-rivet -a 2511.15569 --provider anthropic
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
You can also override the model:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
./agent-rivet -a 2511.15569 --provider google --model gemini-3.1-pro-preview
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## Environment variables
|
|
133
|
+
|
|
134
|
+
`agent-rivet` detects the provider and model from either CLI flags or environment variables.
|
|
135
|
+
|
|
136
|
+
Supported environment variables:
|
|
137
|
+
|
|
138
|
+
- `LLM_PROVIDER`
|
|
139
|
+
- `LLM_MODEL`
|
|
140
|
+
- `GOOGLE_API_KEY`
|
|
141
|
+
- `OPENAI_API_KEY`
|
|
142
|
+
- `ANTHROPIC_API_KEY`
|
|
143
|
+
|
|
144
|
+
Examples:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
export LLM_PROVIDER=google
|
|
148
|
+
export GOOGLE_API_KEY=...
|
|
149
|
+
./agent-rivet -a 2511.15569
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
export LLM_PROVIDER=openai
|
|
154
|
+
export LLM_MODEL=gpt-5
|
|
155
|
+
export OPENAI_API_KEY=...
|
|
156
|
+
./agent-rivet -a 2511.15569
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
If `--model` and `LLM_MODEL` are not supplied, `utils.detect_provider()` chooses a default model for the selected provider.
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
A more detailed discussion of the code structure can be found [here](docs/code-structure.md)
|
|
163
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
COPYING
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
AgentRivet.egg-info/PKG-INFO
|
|
5
|
+
AgentRivet.egg-info/SOURCES.txt
|
|
6
|
+
AgentRivet.egg-info/dependency_links.txt
|
|
7
|
+
AgentRivet.egg-info/entry_points.txt
|
|
8
|
+
AgentRivet.egg-info/requires.txt
|
|
9
|
+
AgentRivet.egg-info/top_level.txt
|
|
10
|
+
agents/__init__.py
|
|
11
|
+
agents/analyst_agent.py
|
|
12
|
+
agents/cli.py
|
|
13
|
+
agents/code_reviewer_agent.py
|
|
14
|
+
agents/coder_agent.py
|
|
15
|
+
agents/core.py
|
|
16
|
+
agents/memory.py
|
|
17
|
+
agents/physics_reviewer_agent.py
|
|
18
|
+
agents/providers/anthropic_backend.py
|
|
19
|
+
agents/providers/google_backend.py
|
|
20
|
+
agents/providers/openai_backend.py
|
|
21
|
+
tests/test_agent.py
|
|
22
|
+
tests/test_factory.py
|
|
23
|
+
tests/test_memory.py
|
|
24
|
+
tests/test_review_loop.py
|
|
25
|
+
tests/test_utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
agents
|