Skip to main content

# AgentSafe Python SDK

Real-time URL trust scoring for AI agents. Block phishing, scam sites, and malicious redirects before your agent interacts with them.

## Installation

````pip install agentsafe```

## Quick Start

from agentsafe import AgentSafe



client = AgentSafe(api\_key="your\_api\_key")



result = client.check("https://example.com", action="payment")

print(result.score)        # 0-100

print(result.recommendation)  # TRUSTED or RISKY

print(result.blocked)      # True or False

## Raise on Block

from agentsafe import AgentSafe



client = AgentSafe(api\_key="your\_api\_key")



\# Raises exception if URL is blocked

client.check\_or\_raise("https://example.com", action="payment")

## Environment Variable

import os

from agentsafe import check



os.environ\["AGENTSAFE\_API\_KEY"] = "your\_api\_key"

result = check("https://example.com", action="payment")

## LangChain Integration

from agentsafe import AgentSafe



safe = AgentSafe(api\_key="your\_api\_key")



def safe\_browse(url: str) -> str:

    safe.check\_or\_raise(url, action="browse")

    # proceed with browsing...

    return "Safe to proceed"

## Actions

- browse — general browsing

- payment — making a payment

- login — logging into a site

- download — downloading a file

## Get an API Key

Visit [agentsafe.app](https://agentsafe.app) to get your API key.

## License

MIT




Save it. 👊

Release files for agentsafe-sdk 0.1.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 agentsafe-sdk 0.1.0
File Size Uploaded
agentsafe_sdk-0.1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentsafe-sdk 0.1.0
File Interpreter ABI Platform
agentsafe_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / agentsafe_sdk-0.1.0.tar.gz

Download URL agentsafe_sdk-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
57547987b4978fa93df19fdcf98d0cb93526e7afc1388be937d6b861298723d8
BLAKE2b-256 checksum
How to use checksums
1cc172102ebada8602ac8f0a04c87512a92da147aeb6e72af493916895d46e68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / agentsafe_sdk-0.1.0-py3-none-any.whl

Download URL agentsafe_sdk-0.1.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
946f34b6fccbae19fe3edc3c1c1acbe2f6573460a2486ba685e091fc91c9e192
BLAKE2b-256 checksum
How to use checksums
5ac5afb4fbdb1af1e06ffae13dc8d90fc94cedacbb902a12ae2ba784e24b5c9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.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