Metadata-Version: 2.3
Name: argus-utils
Version: 0.2.0
Summary: Record every model call (what the model saw, what it said) of an agent run in one unified JSONL format, for any inference library.
Project-URL: Homepage, https://github.com/ARGUS-Benchmark/argus-utils
Project-URL: Source, https://github.com/ARGUS-Benchmark/argus-utils
Project-URL: Issues, https://github.com/ARGUS-Benchmark/argus-utils/issues
Author: The ARGUS authors
License: MIT
Keywords: agents,benchmark,llm,logging,rollouts,sglang,vllm
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Provides-Extra: test
Requires-Dist: openai; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# argus-utils

Record every model call of an agent run, whatever inference library runs the model, in one plain JSON Lines file.
For each call it stores what the model was shown and what it produced.

```
pip install argus-utils
```

```python
import argus_utils
argus_utils.record_to("rollout.jsonl", revision="<full model commit hash>", library="vllm 0.23.0 (server)",
                      dtype="bfloat16", quantization="none", chat_template="default")
# ... run your agent as usual: every OpenAI-SDK chat call (vLLM, SGLang, llama.cpp, Ollama, LiteLLM, LangChain; sync, async, streaming) is recorded
```

Model runs inside your own process (transformers, vLLM `LLM`, SGLang `Engine`, llama-cpp-python)? One call after each generation:

```python
argus_utils.log(messages, generated_text, tools=tools, model="Qwen/Qwen3-1.7B", sampling={"temperature": 0.7, "top_p": 0.95})
```

Agent you cannot edit, or one that runs in a container? Set `ARGUS_BENCH_LOG=/path/rollout.jsonl` in its environment.
Check the result with `argus-utils check rollout.jsonl`.

Every header the package writes carries a `rollout_id` (random unless you pass your own to `record_to`) and the benchmark canary string (`argus_utils.CANARY`), so the files can be kept out of training data. Both are required in a submission. If you write rollout files yourself, add them as the `rollout_id` and `canary` keys of the header.

This package was called `argus-bench` up to 0.1.4. Install `argus-utils` and import `argus_utils` instead.

Submit your task at [github.com/ARGUS-Benchmark/task-submissions](https://github.com/ARGUS-Benchmark/task-submissions).

* [docs/USAGE.md](docs/USAGE.md): how to record with every supported way of running a model
* [docs/EXAMPLE.md](docs/EXAMPLE.md): a complete worked example (record, verifier, submission, annotations)
* [docs/SUBMISSION.md](docs/SUBMISSION.md): verifier, `Verdict`, labels, evidence, and `argus-utils check-submission`
* [docs/FORMAT.md](docs/FORMAT.md): the exact file format, so you can produce it without this package
* [docs/TESTED.md](docs/TESTED.md): what has and has not been tested
