argus
Auto-instrumenting observability SDK for LLM inference.
One call at startup. Every provider call in the process is captured after that — including calls made by code you did not write, because the instrumentation replaces the method on the provider's class, not on a client instance you hand it.
Install
uv add llm-argus
pip install llm-argus
The distribution is llm-argus; the import is argus.
Provider packages are extras, not dependencies — instrumenting Groq should not require OpenAI's package to be installed:
uv add "llm-argus[groq]" # or llm-argus[openai], llm-argus[all]
Unreleased work can be installed straight from the repository:
uv add "llm-argus @ git+https://github.com/shrirang3/argus@main#subdirectory=packages/argus"
Use
import argus
argus.init(endpoint="http://ingestion:8001/v1/events", service="chat-app")
# ...unchanged application code...
resp = await client.chat.completions.create(model=..., messages=...) # logged
await argus.shutdown() # in your shutdown hook — drains the buffer
Both arguments fall back to environment variables (ARGUS_ENDPOINT,
ARGUS_SERVICE), so in a container the integration is import argus plus
argus.init().
To correlate calls into conversations:
with argus.conversation(conversation_id):
...
Without it, events are still recorded — conversation_id is simply NULL.
What it guarantees
The wrapper is a decorator, never a replacement:
- Calls through. The provider's own method does the work.
- Re-raises the original exception. Never swallowed, never re-wrapped.
- Returns the response untouched. The application cannot tell it is there.
The transport is non-blocking: emit() appends to a bounded in-memory buffer
and returns. A background task batches and POSTs. On failure it degrades in
stages — retry with backoff, then spill to disk, and only then drop, oldest
first, counted. argus.stats() exposes those counters so data loss is visible
rather than silent.
What it instruments today
| Providers | Groq, and anything on the OpenAI wire format (OpenAI, Cerebras, …) |
| Method | chat.completions.create, sync and async |
| Streaming | async fully (including time-to-first-token); sync emits without output or usage |
Anthropic and the OpenAI Responses API are not wired yet.
Configuration
Every field of argus.Config is overridable by environment variable, because
the knobs that need turning — buffer size, flush interval — are the ones you
discover under load, in a deployed container, without a code change:
ARGUS_ENDPOINT, ARGUS_SERVICE, ARGUS_ENABLED, ARGUS_QUEUE_MAXSIZE,
ARGUS_BATCH_SIZE, ARGUS_FLUSH_INTERVAL, ARGUS_TIMEOUT,
ARGUS_MAX_RETRIES, ARGUS_SPILL_PATH.
Requirements
Python 3.11+, and a collector listening at endpoint that accepts the
EventBatch payload in argus.schema. The reference collector, worker,
Postgres schema and dashboard live in the
argus repository.
The drain task starts on the running asyncio event loop, so a fully synchronous (WSGI) application will buffer events without sending them.
License
MIT
Metadata
Release files for llm-argus 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_argus-0.1.0.tar.gz | 15.9 kB | Without provenance | Details for llm_argus-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_argus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llm_argus-0.1.0-py3-none-any.whl |
Total release size: 35.2 kB
Release files / llm_argus-0.1.0.tar.gz
| Download URL | llm_argus-0.1.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b94e2cc607589167a41c26296a19469a2e2b506cefe5117190d62c347d999ba7
|
|
BLAKE2b-256 checksum How to use checksums |
5007831a9170bc27f4da77f77905aeccbca5e6642d713ffcddc157b38b99cc7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / llm_argus-0.1.0-py3-none-any.whl
| Download URL | llm_argus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23cb0b9e74b1db92bd992785f58ede7af0b4411d348f648297a8b4a1158fe5e5
|
|
BLAKE2b-256 checksum How to use checksums |
e8021cf2e4aaf61f542ce2ae85e18a38be1ded5e461e69cefe8dbfeb7ac37aa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for llm-argus 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.