argox — Python SDK
pip install argox
For agents that aren't Claude Code (LangChain tools, OpenAI Agents SDK, a homegrown loop) and so have no PreToolUse/PostToolUse hook mechanism to plug into. Wrap your own tool calls with two lines:
import argox as at
def write_file(path, content):
result = at.check("write_file", path)
if not result.allowed:
raise PermissionError(result.reason)
output = _actually_write(path, content)
at.record_output("write_file", path, output)
return output
action is a generic verb -- read_file / write_file / run_shell /
call_api get real policy rules (path denylist, dangerous shell
detection, taint-based secret/PII exfil checks). Any other string still
gets a decision back (default-allow), just without a verb-specific rule.
Config
Reads ARGOX_API_KEY (the same key argox connect writes for
Claude Code) and optionally ARGOX_API_BASE from the environment,
or pass them explicitly:
at.configure(api_key="...", api_base="https://your-instance")
Sessions
Pass the same session_id across an agent run's tool calls to group them
into one session/trace on the dashboard, and so later check() calls
inherit taint tags absorbed by earlier record_output() calls (e.g. a
call_api right after a read_file that returned a secret gets flagged
even though the call itself looks benign in isolation). Omit it and each
call is treated as its own session.
Errors vs. denials
A policy "deny" is a normal, successful check() result
(result.allowed is False) -- not an exception. ArgoxError is only
raised for auth/network/protocol failures talking to the backend itself.
check() never raises on a deny, so callers must check .allowed.
Metadata
Release files for argox 0.2.1
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 |
|---|---|---|---|---|
| argox-0.2.1.tar.gz | 4.4 kB | Without provenance | Details for argox-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argox-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for argox-0.2.1-py3-none-any.whl |
Total release size: 9.2 kB
Release files / argox-0.2.1.tar.gz
| Download URL | argox-0.2.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7446bf81d3e023285605c99ed53d34bc95c075faf528ea7ae58ad63a319b4394
|
|
BLAKE2b-256 checksum How to use checksums |
c8d1e8fc2d5d84794e4a6427da7a09665d1d59997be799b3f6ef6096b291d38f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / argox-0.2.1-py3-none-any.whl
| Download URL | argox-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72b65d648de686d2d6f1cb6c70a41883b3583a704bed7b59e44b7027772cc7fa
|
|
BLAKE2b-256 checksum How to use checksums |
eea6f6a0e69c14f47b43413da883be811897be291644787076f09a70e4971ea7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for argox 0.2.1
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.