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
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 llm_argus-0.1.0.tar.gz.
File metadata
- Download URL: llm_argus-0.1.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b94e2cc607589167a41c26296a19469a2e2b506cefe5117190d62c347d999ba7
|
|
| MD5 |
fa071d99cc8bddd084573a159c3a46fc
|
|
| BLAKE2b-256 |
5007831a9170bc27f4da77f77905aeccbca5e6642d713ffcddc157b38b99cc7f
|
File details
Details for the file llm_argus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llm_argus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23cb0b9e74b1db92bd992785f58ede7af0b4411d348f648297a8b4a1158fe5e5
|
|
| MD5 |
73911d9d5ba1613d79fe8a06ffd53eb7
|
|
| BLAKE2b-256 |
e8021cf2e4aaf61f542ce2ae85e18a38be1ded5e461e69cefe8dbfeb7ac37aa6
|