Skip to main content

argox — Python SDK

Not published to PyPI yet -- install from source for now:

pip install -e /path/to/agent-trial/sdk/python

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.

Release files for argox 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argox 0.2.0
File Size Uploaded
argox-0.2.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argox 0.2.0
File Interpreter ABI Platform
argox-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / argox-0.2.0.tar.gz

Download URL argox-0.2.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e299a2134ec415789cb6bbe4ea6b40c4198c2ce298198a8e17f81ca57c14859e
BLAKE2b-256 checksum
How to use checksums
ff44391d69a410aab76a8af425ee472aa111960d51129f816635e24fa66bda5b
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.0-py3-none-any.whl

Download URL argox-0.2.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
491a3a7e1fba3f1bf262d5269c4e48a46fd73983b51cd0a6047eaa2b5ed18929
BLAKE2b-256 checksum
How to use checksums
9d137b67adfc8ba9400ef4f1e0fef6407e9232ea6b9b6c1c1abb0c6917dd0503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page