Skip to main content

ARGUS Python SDK - Framework-agnostic AI agent guardrails and safety tool

Project description

ARGUS Python SDK

The official Python SDK for ARGUS — the Agent Runtime Guardrail & Unauthorized-action Stopper.

Securing what AI agents do — not just what they hear.

Installation

You can install the SDK via pip:

pip install argus-sdk

Or using uv:

uv add argus-sdk

Quick Start

1. Set your Environment Variables

export ARGUS_API_KEY="your-api-key"
export ARGUS_BASE_URL="http://localhost:8000"

2. Protect Your Tools

Wrap your critical agent tools with the @argus.protect decorator.

import argus

@argus.protect(action_type="send_email", target_type="email")
def send_email(to_address: str, subject: str, body: str):
    # This function will ONLY execute if ARGUS approves the action
    print(f"Sending email to {to_address}...")
    return True

3. Run the Agent within a Session

When a user submits a prompt, wrap the execution in an argus.Session. This automatically extracts the user's intent and establishes a temporary authorization boundary.

import argus
from argus import ArgusQuarantineException

prompt = "Send the Q3 report to alice@example.com"

# 1. Extract Intent and start session
with argus.Session(user_prompt=prompt):
    try:
        # Agent decides to execute the tool
        send_email(to_address="alice@example.com", subject="Q3 Report", body="Attached.")
        print("Success!")
        
        # If the agent goes rogue and tries to email someone else:
        send_email(to_address="eve@example.com", subject="Q3 Report", body="Attached.")
        
    except ArgusQuarantineException as e:
        print(f"Agent was stopped! Reason: {e.explanation}")

Integrations

LangChain

ARGUS provides native wrappers for LangChain tools.

from argus.integrations.langchain import wrap_langchain_tool
from langchain_core.tools import tool

@tool
def read_patient_record(patient_id: str) -> str:
    """Reads a patient record."""
    return "Patient Data"

# Wrap the tool
protected_tool = wrap_langchain_tool(
    tool=read_patient_record,
    action_type="read_patient_record",
    target_type="patient_record"
)

# Use it within an argus.Session normally!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argus_shield-0.1.3.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

argus_shield-0.1.3-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file argus_shield-0.1.3.tar.gz.

File metadata

  • Download URL: argus_shield-0.1.3.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for argus_shield-0.1.3.tar.gz
Algorithm Hash digest
SHA256 503a9cdd178b78be4260dbad0ecc90f2fff138c1efcdf40cca85d4f4a500930e
MD5 39f53b77def6f350e569edb7d4c75654
BLAKE2b-256 c76bc613f645b6a6e5c4e075840844f0e927395e0b52e839ba8ffb6d42ca4ca3

See more details on using hashes here.

File details

Details for the file argus_shield-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: argus_shield-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for argus_shield-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5d66beedf973ce621868c67c5d893b3703119f2d85998b945d9529b9e0345d92
MD5 9a5abb4c07eab830d4c50c7352b4c22d
BLAKE2b-256 a2865d2dbd73c4c79abae32e80cf80b48bb3d2561cbb8fc9130481f57f02247b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page